+ Reply to Thread
Results 1 to 5 of 5

Merging similar rows of data, while appending unique data across multiple columns

  1. #1
    Registered User
    Join Date
    01-15-2013
    Location
    Vancouver, BC
    MS-Off Ver
    Excel 2010
    Posts
    3

    Merging similar rows of data, while appending unique data across multiple columns

    I have found many similar (but not identical) examples to my issue - but thus far I have not been able to resolve. I am hoping that this post may prompt some guidance.

    I am attempting to merge similar (but not identical) rows of data

    My source table has 17 columns

    Cols 1-14 (A1-N) are often repeated on multiple rows. However where 1-14 match, cols 15-17 (O-Q) are always unique.
    There can be one or more versions of these scenarios in the data file (usually no more than 7 occurrences of one matching col-14 series)
    My goal is to
    * combine the duplicates rows into one for Col 1-14
    * append groups of 3 columns to that consolidated row for each unique occurrence of Cols 15-17
    * delete the recurring rows (or simply write the consolidated data set to a new sheet)

    e.g.

    12345678901234AAA
    12345678901234BBB
    12345678901234CCC
    09876543210987DDD
    09876543210987EEE

    When merged - the output would

    12345678901234AAABBBCCC (resulting in a 23 column row)
    09876543210987DDDEEE (resulting in a 20 column row)

    Any suggestions for accomplishing this would be appreciated.

    Thank you
    Last edited by stawamus; 01-15-2013 at 08:44 PM.

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

    Re: Merging similar rows of data, while appending unique data across multiple columns

    Hi

    This assumes your data is on sheet1, starting in A1 and you have a second sheet in your workbook called sheet2.

    Please Login or Register  to view this content.
    rylo

  3. #3
    Registered User
    Join Date
    01-15-2013
    Location
    Vancouver, BC
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Merging similar rows of data, while appending unique data across multiple columns

    Hello and thank you for the very quick response and solution. I tested it and can see that it is almost there. I think I was incomplete in my example - While the info I gave described what I am trying to do - the characters in each column position were representing the contents of each cell (i.e. in reality - each cell can have multiple characters).

    I created and have attached here a mockup of the data file which more accurately represents the source data. I also loaded and ran your suggested macro. I can see that it is doing the concatenation as I had hoped (brilliant!) - unfortunately it is parsing out the contents of each original cell into separate columns. Sorry for the incomplete specs. Would it take much further modification to avoid the cell parsing and move each cell content intact?

    Thanks again for your support!

    Data Merge Test v2.xlsm

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

    Re: Merging similar rows of data, while appending unique data across multiple columns

    Hi

    OK, try this one.

    Please Login or Register  to view this content.
    rylo

  5. #5
    Registered User
    Join Date
    01-15-2013
    Location
    Vancouver, BC
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Merging similar rows of data, while appending unique data across multiple columns

    This revised version worked perfectly!! You have saved me what would have otherwise been many many hours of tedious manual data manipulation. Thank you for your generous and incredibly speedy assistance.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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