+ Reply to Thread
Results 1 to 6 of 6

cleaning up my list - remove items in the list

  1. #1
    Registered User
    Join Date
    04-04-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    3

    cleaning up my list - remove items in the list

    Hi to all

    Appreciate your help in this.

    Let's say I have a list of 500 keyword phrases as below:

    CellA1 guitar chords
    CellA2 guitar chord
    CellA3 guitar chords with scores
    CellA4 guitar chords expert
    .....

    "guitar chords" actually appears in CellA3 and A4. So I will like to remove CellA1.

    "guitar chord" (without 's') do not appear anywhere else. So I will like to retain CellA2.

    The process is repeated for each cell until the end of list. How should I do that via formula and macro?

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: cleaning up my list - remove items in the list

    Hello tmssj2000,

    Welcome to the Forum!

    Are you looking for just these 2 phrase pairs on your worksheet or will there be more?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    04-04-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: cleaning up my list - remove items in the list

    Maybe I should rephrase my question and my requirements.

    Let's say I have a list of 5 keyword phrases as below:

    CellA1 guitar chords
    CellA2 guitar chord
    CellA3 guitar chords with scores
    CellA4 guitar chords expert
    CellA5 guitar chords with scores of music

    The macro will begin with CellA1 and check the rest of the list (CellA2 till end of list) for any cell that contains the contents of CellA1. Once it is able to find an instance for that, it returns "YES" in CellB1. In this case, the first instance is found in CellA3 and so CellB1 returns "YES".

    Next, the macro moves to CellA2 and check the rest of the list (CellA3 till end of list) for any cell that contains the contents of CellA2. CellA2 contains "guitar chord" so the macro will check CellA3 till CellA5 on whether they contain "guitar chord". In this case, CellB2 will return "NO" as there is no cell that contains "guitar chord" exactly. That means "guitar chords with scores" is a "NO" while for example "guitar chord with scores" is a "YES".

    The macro then moves on to subsequent cells down ColumnA to keep on checking until the end of list.

    This is just a make-up list of 5 phrases. What I require is a general macro that can handle at least 5000 phrases.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: cleaning up my list - remove items in the list

    Hello tmssj2000,

    I have a few ideas for a solution to this. Rather than spend time posting questions and waiting for answers, it would be faster if you post a sample workbook.

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: cleaning up my list - remove items in the list

    Hello tmssj2000,

    Your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser)to the cross-post. Expect cross-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us help you!

    Corss posted at http://www.mrexcel.com/forum/showthread.php?t=382428

  6. #6
    Registered User
    Join Date
    04-04-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: cleaning up my list - remove items in the list

    Attached is my sample workbook.

    Sorry for the cross-posting. I was unaware of the rules.
    Attached Files Attached Files

+ 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