+ Reply to Thread
Results 1 to 9 of 9

Delete the content if it has complete set of data

Hybrid View

  1. #1
    Registered User
    Join Date
    04-23-2008
    Posts
    48

    Delete the content if it has complete set of data

    hi all,

    good day.

    i facing a problem here how to delete a data in 1 column.
    i don't know how to explain, so i attach the excel file here to explain.

    Hope can solve it.

    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Delete the content if it has complete set of data

    ccs_1981,

    See the attached workbook "Create Summary - Countif Match - ccs_1981 - SDG10.xls" with macro "CreateSummary".

    Detach/open the workbook and run the "CreateSummary" macro.
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  3. #3
    Registered User
    Join Date
    04-23-2008
    Posts
    48

    Re: Delete the content if it has complete set of data

    Quote Originally Posted by stanleydgromjr View Post
    ccs_1981,

    See the attached workbook "Create Summary - Countif Match - ccs_1981 - SDG10.xls" with macro "CreateSummary".

    Detach/open the workbook and run the "CreateSummary" macro.
    thanks, but you already hardcode to 3 restaurants. anyways can solve it beside hardcode? i may hv more than 10 restaurants...

  4. #4
    Registered User
    Join Date
    04-23-2008
    Posts
    48

    Re: Delete the content if it has complete set of data

    anyone can help?

  5. #5
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Delete the content if it has complete set of data

    ccs_1981,

    How about another workbook with examples of "i may hv more than 10 restaurants...".

    And, what is the logic for more than 3 restautants?
    Last edited by stanleydgromjr; 11-16-2009 at 09:31 AM.

  6. #6
    Registered User
    Join Date
    04-23-2008
    Posts
    48

    Re: Delete the content if it has complete set of data

    Quote Originally Posted by stanleydgromjr View Post
    ccs_1981,

    How about another workbook with examples of "i may hv more than 10 restaurants...".

    And, what is the logic for more than 3 restautants?


    thanks for your reply, i thought u had hardcoded to max 3 records.

     For a = 2 To LR2 Step 1
        If .Cells(a, "F").Value < 3 Then
          Hold = ""
          SR = .Cells(a, "G").Value
          For b = 1 To .Cells(a, "F").Value Step 1
            Hold = Hold & .Cells(SR, "A") & ", "
            SR = SR + 1
          Next b
          If Right(Hold, 2) = ", " Then
            Hold = Left(Hold, Len(Hold) - 2)
            .Cells(a, "D") = Hold
          End If
        End If
      Next a

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1