+ Reply to Thread
Results 1 to 5 of 5

How to Transpose if duplicates

  1. #1
    Registered User
    Join Date
    05-26-2011
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    How to Transpose if duplicates

    After much trial and error and searching for a solution, I'm stumped. I'm not even sure you need a macro for this but maybe. I have a worksheet of over 20,000 rows of data. I've sorted the data by column B. I need to combine and transpose (starting at column C) when there are like-duplicates. The example below should explain it clearly. It doesn't matter whether the output is separated by commas or separated into cells.


    A1 B1 C1 (Desired Output)

    A A A A, A C, A P, A M, A E, A F, A G
    C A
    P A
    M A
    E A
    F A
    G A
    H B B H, B A, B R, B K, B L, B N, B O
    A B
    R B
    K B
    L B
    N B
    O B
    U C C U, C H
    H C
    Y D D Y, D E, D P
    E D
    P D

    etc...

    Thanks for the help.

  2. #2
    Registered User
    Join Date
    05-26-2011
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: How to Transpose if duplicates

    It took out spaces between letters in the example, so to make it easier to understand I attached an excel spreadsheet.
    Attached Files Attached Files

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to Transpose if duplicates

    maybe something like this
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Registered User
    Join Date
    05-26-2011
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: How to Transpose if duplicates

    Wow, that's a really impressive formula. I'm going to have to spend some more time with it to fully understand it. I think it's close but I can't seem to modify it to make it work the way I need it to. I attached a much clearer example, using names.

    Since I couldn't seem to find a solution anywhere for this, I hope that your effort is useful to more users than just me. Thanks again.
    Attached Files Attached Files

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to Transpose if duplicates

    i see you decided to reverse order but here you go
    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)

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