+ Reply to Thread
Results 1 to 5 of 5

Macro to transpose data from two columns into multiple rows

  1. #1
    Registered User
    Join Date
    08-27-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Macro to transpose data from two columns into multiple rows

    I'm trying to copy a larger amount of data that is formatted in two columns. Column A has many repeated values. I need every cell in Column B that have the same value in A to be listed in one row.
    I haven't been able to find an existing post that works for my data set, and I am not familiar enough with marcos to edit/trailor code already on the site to solve my problem.

    An example of what the data is currently formatted like:

    1 A
    1 B
    2 C
    2 D
    2 E
    3 J
    3 K
    3 L
    3 M

    And I need it to look like this:

    1 A B
    2 C D E
    3 J K L M

    Does anyone have a Macro that could work for this?

    Thanks in advance for the help
    Last edited by Briansva92; 08-27-2012 at 05:32 PM.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro to transpose data from two columns into multiple rows

    Hi Briansva92,

    Jindon wrote one of these the other day - I so admired the code that I saved it, here it is adapted to your example:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    08-27-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Macro to transpose data from two columns into multiple rows

    Thank you so much, it works great. This will save me a lot of time.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro to transpose data from two columns into multiple rows

    You're welcome! It's Jindon's code though - I wish I'd written it!

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Macro to transpose data from two columns into multiple rows

    @ Briansva92

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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