+ Reply to Thread
Results 1 to 5 of 5

Concatenating values from a single column to remove duplicates in another.

  1. #1
    Registered User
    Join Date
    04-01-2011
    Location
    Alberta, Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Concatenating values from a single column to remove duplicates in another.

    Hello,

    I am trying to combine columns so I can get rid of the duplicate values in COLUMNA, and concatenate the corresponding values in COLUMNB with a "; " separating them. I was wondering what kind of formula I would need to do so.

    What I have:
    Please Login or Register  to view this content.
    What I need the final result to be:
    Please Login or Register  to view this content.
    I have a worksheet of over 1,000 values, and about half of them contain duplicate COLUMNA values.

    I hope I was descriptive enough, let me know if you have questions regarding my examples.

    Thank you!
    Last edited by Mumps; 06-06-2012 at 02:15 PM.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Concatenating values from a single column to remove duplicates in another.

    Mumps,

    Unfortunately, Excel's native CONCATENATE() function doens't work with arrays. This means that there is no way Excel can perform what you're asking for without the use of VBA or an add-in. I recommend the Morefunc add-in which provides the MCONCAT function which is designed for exactly this task.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    06-06-2012
    Location
    Santa Cruz
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Concatenating values from a single column to remove duplicates in another.

    Paste in cell C2 and drag down, assuming column A is sorted in ascending order:

    =IF(A2=A1,CONCATENATE(C1,"; ",B2),B2)


    Best

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Concatenating values from a single column to remove duplicates in another.

    DJ JR's suggestion will result in the following:

    Please Login or Register  to view this content.

    If that's what you are looking for, then it is a good solution. It does require that column A be sorted (as he already pointed out).

  5. #5
    Registered User
    Join Date
    04-01-2011
    Location
    Alberta, Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Concatenating values from a single column to remove duplicates in another.

    Thanks a bunch, you have solved my problem. After this I was just able to isolate the values and delete my duplicates by using the longest string of values in relation to column A.

    My day is saved :D

+ 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