+ Reply to Thread
Results 1 to 9 of 9

How to combine multiple rows of duplicate data and one cell of unique data

  1. #1
    Registered User
    Join Date
    11-25-2013
    Location
    Orange County, CA
    MS-Off Ver
    Excel 2003
    Posts
    3

    How to combine multiple rows of duplicate data and one cell of unique data

    I have a customer list of over 7000. In columns A-J, lists the customers information and in column K the type of product. There are rows with duplicate customer information (up to 12 rows) because of the different products in the last column.

    I would like to have a list that combines the duplicate customer information into a single row and lists the different products in one cell separating each with a comma.

    Is there an easy way I can do this? I'm having such a hard time and I also looked in the forum for the equation but was unsuccessful.

    I appreciate the help in advance!
    Sample-Data.xlsx
    Attached Files Attached Files
    Last edited by scpg13; 11-25-2013 at 09:19 PM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: How to combine multiple rows of duplicate data and one cell of unique data

    Look at the 3rd posting in this thread

    http://www.excelforum.com/excel-form...e-results.html

    Install the vba UDF and run it. Then do a delete duplicates from the ribbon.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to combine multiple rows of duplicate data and one cell of unique data

    You need a VBA UDF (User Defined Function) to do this.

    Are you familiar with using macros?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    11-25-2013
    Location
    Orange County, CA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: How to combine multiple rows of duplicate data and one cell of unique data

    I am not familar with macros. I've never used macros before.

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to combine multiple rows of duplicate data and one cell of unique data

    With your file open...

    Press the key combination of Alt+F11 to open the Visual Basic Editor

    Goto the menu Insert>Module

    Copy the VBA code below and paste it into the window that opens on the right side of the screen

    Press the key combination of ALT+Q to close the Visual Basic Editor and return to Excel.

    Please Login or Register  to view this content.
    Then, in your file...

    Enter this array formula** in cell K18:

    =concatall(IF(B$2:B$12=B18,K$2:K$12,""),",")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Copy down as needed.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to combine multiple rows of duplicate data and one cell of unique data

    P.S.

    If you're using Excel 2007 or later you'll have to save the file as a macro enabled file in the *.xlsm file format.

  7. #7
    Registered User
    Join Date
    11-25-2013
    Location
    Orange County, CA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: How to combine multiple rows of duplicate data and one cell of unique data

    Thanks Tony so much! I'm such a novice at excel. I appreciate all the help!

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to combine multiple rows of duplicate data and one cell of unique data

    Here's your file with this implemented:

    Sample Data(1).xlsm

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to combine multiple rows of duplicate data and one cell of unique data

    You're welcome. Thanks for the feedback!

+ 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. Combine Duplicate Rows and Combine Data in Rows
    By cherylmcgk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-08-2013, 12:04 PM
  2. Duplicate rows, delete columns w/same data, combine columns w/unique data, Mac Excel 2011
    By msmcoin in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 2
    Last Post: 02-03-2013, 02:10 PM
  3. Merge duplicate rows and combine data in some of the same columns
    By Ken.runciman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-23-2013, 11:43 PM
  4. Combine and Sum data in multiple rows if duplicate exists in 1 column
    By bnasty in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-31-2012, 07:11 PM
  5. Combine rows of data into 1 cell based on unique identifier
    By jud_goh in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-11-2010, 05:06 PM

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