+ Reply to Thread
Results 1 to 4 of 4

delete some rows based on the data

Hybrid View

ccs1981 delete some rows based on the... 12-04-2008, 05:41 AM
Hung I would approach it like... 12-04-2008, 06:17 AM
ccs1981 hi.. 12-04-2008, 07:00 AM
ccs1981 any idea? 12-05-2008, 06:40 AM
  1. #1
    Registered User
    Join Date
    09-16-2008
    Location
    malaysia
    Posts
    89

    delete some rows based on the data

    hi all..


    i attach Book1.xls to explain what i want to do.

    at the sheet 1, "input", is is the original example data before run the marco.
    at the sheet 2, "explain output", is is explaination for the marco.
    at the sheet 3, "output", is the output i want

    please assist. thanks
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    12-04-2008
    Location
    The Mind
    Posts
    3
    I would approach it like this;
    Merge textstrings in column one and two, but separate the strings with a recognisable sign, like ";"
    Then count the occurence of the resulting textstrings line by line. Delete those that have count higher than 1.

    After that works, the "remark" column needs to be merged, based on the value of the "Favorite Fruit" column (For each.. If..Then..Else..End If...Next).
    Stringmerging can be done like this;

    Sub GlueStrings()
    Dim strTitle As String
    Dim strFirstName As String
    Dim strLastName As String
    
    strTitle = "Sir"
    strFirstName = "Ronald"
    strLastName = "McDonald"
    
    Dim strSalutation As String
    
    strSalutation = strTitle & " " & strFirstName & " " & strLastName
    MsgBox (strSalutation)
    End Sub
    Cutting the value in column "Remark" and adding the string to "Favorite Fruit" column goes the same way.
    Last edited by Hung; 12-04-2008 at 06:22 AM.

  3. #3
    Registered User
    Join Date
    09-16-2008
    Location
    malaysia
    Posts
    89

    hi..

    hi.. hv any better solutions? please help.. thanks..
    Last edited by ccs1981; 12-05-2008 at 05:58 AM.

  4. #4
    Registered User
    Join Date
    09-16-2008
    Location
    malaysia
    Posts
    89

    any idea?

    any idea? i am lack of solutions

+ 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