+ Reply to Thread
Results 1 to 5 of 5

Sort

  1. #1
    Registered User
    Join Date
    01-11-2010
    Location
    USA
    MS-Off Ver
    2010
    Posts
    48

    Sort

    I need help with VBA code to perform a complex sort. Basically, I have a column of names, each with one or more duplicates, and many columns of colors. Each column represents a different color. For each name (and duplicates) in column A, there may be one or more associated colors. The same name may have one color, and the same name in the next row may have another. So, I need VBA code that will find and all colors for each unique name and place them in a column.

    See the attached file for a clearer picture. Test Case - Data Manipulation.xlsx
    *Please note that I have a much larger file with way more names and colors. This is just a sample.

    I have tried many different ways, but without success. Any help would be greatly appreciated.
    Last edited by tshrader; 12-14-2011 at 06:37 PM.

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Sort

    Try this...
    Please Login or Register  to view this content.

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

    Re: Sort

    Hi

    Try this. It doesn't bring back the data in the same order, but I think it is all there.

    Please Login or Register  to view this content.
    rylo

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Sort

    Hi,

    One way

    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Registered User
    Join Date
    01-11-2010
    Location
    USA
    MS-Off Ver
    2010
    Posts
    48

    Re: Sort

    Wow, you all are very talented, thanks!! Dangelor and Rylo's code worked exactly as I imagined. Richard Buttrey's code worked as well but wasn't quite as refined. I didn't imagine I would have options for code! You are all impressive and I hope you accept my greatest thank you. Thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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