+ Reply to Thread
Results 1 to 7 of 7

move data from diff rows in 1 column into new columns based on dup data in another field

  1. #1
    Registered User
    Join Date
    08-29-2009
    Location
    California, USA
    MS-Off Ver
    Excel 2007
    Posts
    15

    Question move data from diff rows in 1 column into new columns based on dup data in another field

    Is there a way to split data from different rows in one column into new columns based on duplicate data in another column, so that I only see 1 row for the data ex:

    Column A Column B Column C

    Gary 1 Gold
    Gary 1 Silver
    Gary 1 Bronze
    Jim 1 Silver
    Jim 1 Bronze

    How I need it to display:

    Column A Column B Column C Column D Column E

    Gary 1 Gold Silver Bronze
    Jim 1 Silver Bronze
    Last edited by lxndeb; 07-29-2014 at 02:17 AM. Reason: Formatting text

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: move data from diff rows in 1 column into new columns based on dup data in another fie

    the file "lxndeb 140730.xlsm" is attached
    download the file, open, enable macros

    the data is in sheet1 and result will be in sheet2.
    the macro is module 1 of vbeditor of the file and also repeated below

    Please Login or Register  to view this content.
    Attached Files Attached Files
    I am not an expert. better solutions may be available
    [email protected]

  3. #3
    Registered User
    Join Date
    08-29-2009
    Location
    California, USA
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: move data from diff rows in 1 column into new columns based on dup data in another fie

    Wow! Works great, but I have 1 question though... if I had data(name in this case) that did not have more than one duplicate name in column A for example. How hard is it to update this macro so that it writes that row too? This seems to only write out the ones on sheet two that have duplicates and doesn't touch the ones that don't. If it's too hard, then I can work with this as is and I REALLY appreciate the help. Thanks !

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,618

    Re: move data from diff rows in 1 column into new columns based on dup data in another fie

    Pl see attached file with formulas and macro .
    Select whichever is suitable.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-29-2009
    Location
    California, USA
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: move data from diff rows in 1 column into new columns based on dup data in another fie

    One last question. Say I had 2 or more columns with exact data (column A and B), but one with distinct that I would use this macro for. How do I change the syntax to qualify to look at more than one duplicate column and copy those rows too. Example:

    Gary1 12345 Gold
    Gary1 12345 Silver
    Gary1 12345 Bronze
    Jim1 54321 Gold
    Jim1 54321 Silver
    aaa1 09876 Gold

    To be:

    Gary1 12345 Gold Silver Bronze
    Jim1 54321 Gold Silver
    aaa1 09876 Gold

    Again...thank you so much for the help so far. I really appreciate the time !

  6. #6
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,618

    Re: move data from diff rows in 1 column into new columns based on dup data in another fie

    Pl see attached file.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-29-2009
    Location
    California, USA
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: move data from diff rows in 1 column into new columns based on dup data in another fie

    Thank You so much ! Works like a charm. I really appreciate the help with this.

+ 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. [SOLVED] Move coulumns data of a sheet to diff other columns of other sheet in same workbook
    By ROHAN999 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 09-03-2013, 09:22 AM
  2. Move data in rows to columns based on unique ID in column A
    By ssdsibes in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-04-2013, 07:04 AM
  3. Move Rows of Data from a Specific Column (Based on Matching Criteria) to a new Sheet
    By jordan1214 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-21-2013, 02:30 AM
  4. [SOLVED] Fill formula in column with data taken from diff columns
    By SergSlim in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-31-2012, 10:32 AM
  5. [SOLVED] How to move data in Column A into seperate columns / rows
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-11-2006, 11:00 PM

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