+ Reply to Thread
Results 1 to 5 of 5

Filtering Sheet based on criteria - removing duplicates

  1. #1
    Registered User
    Join Date
    09-25-2008
    Location
    Philippines
    Posts
    3

    Filtering Sheet based on criteria - removing duplicates

    I have a problem with a macro I found in the web. I'm fairly new to macro coding and would really appreciate all the help I can get. I was able to run the macro and I just need one more filtering.

    Raw data looks like this:
    GroupName GroupID SubGroup
    Carol 101 Caroline
    Carol 101 Caroline
    Carol 101 Carl
    Greg 102 Greg1
    Greg 102 Greg1
    Greg 102 Greg 1
    Greg 102 Greg

    I was able to filter to this:
    GroupName GroupID SubGroup
    Carol 101 Caroline / Caroline / Carl
    Greg 102 Greg1 / Greg1 / Greg 1 / Greg

    I would want to filter the SubGroup further to this:
    GroupName GroupID SubGroup
    Carol 101 Caroline / Carl
    Greg 102 Greg1 / Greg 1 / Greg

    -removing the duplicates in SubGroup column.

    Please Help! Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Put this into a general module.

    Please Login or Register  to view this content.
    Then change your button code to be

    Please Login or Register  to view this content.
    rylo

  3. #3
    Registered User
    Join Date
    09-25-2008
    Location
    Philippines
    Posts
    3

    Smile almost there...!

    That's almost it! Except it's also removing data that should stay.

    We begin with this data:

    Carol 101 Caroline
    Carol 101 Carol 1
    Carol 101 Carl

    Greg 102 Greg1
    Greg 102 Greg1
    Greg 102 Greg 1
    Greg 102 Greg

    Tim 103 Tommy
    Tim 103 Tommy
    Tim 103 Timmy
    Tim 103 Timmy
    Tim 103 Tommy

    rylo's code generated this:

    Carol 101 Caroline / Carol 1 / Carl
    Greg 102 Greg 1 / Greg
    Tim 103 Timmy

    For Carol, the result is fine.
    For Greg, it should have been Greg1 / Greg 1 / Greg
    For Tim, it should have been Tommy / Timmy

    Thanks for the quick reply! You the man!
    Thanks rylo!


  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    oops....

    Try

    Please Login or Register  to view this content.
    rylo

  5. #5
    Registered User
    Join Date
    09-25-2008
    Location
    Philippines
    Posts
    3

    Thumbs up Thank you rylo!

    You did it! Thanks so much! I'd shake your hands if I could but the best thing I can do is to thank you from the bottom of my heart! That's one wicked talent you got! You the man!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Report a list line by line based on name criteria
    By cptnmorgan9999 in forum Excel General
    Replies: 9
    Last Post: 06-24-2008, 11:35 PM
  2. Deleting rows based on criteria
    By MJK in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-16-2008, 08:45 AM
  3. paste from 1 sheet into another based on a reference cell
    By howardgrigg in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-03-2007, 05:41 AM
  4. lookup from one document to another and paste in adjacent cell
    By howardgrigg in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-31-2007, 09:43 PM
  5. Filtering data from one work sheet to another
    By Anish in forum Excel General
    Replies: 5
    Last Post: 09-29-2007, 06:16 PM

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