+ Reply to Thread
Results 1 to 7 of 7

Concatenate values from columns and deleting duplicates

  1. #1
    Registered User
    Join Date
    11-23-2006
    Posts
    9

    Concatenate values from columns and deleting duplicates

    Hello,

    In the following example I have 5 columns with values (codes). I need to concatenate in a single cell the values from the 5 columns, deleting the duplicate values. Please see the sheet attached.

    Is there a formula, or maybe a macro that can help me?

    Thank you to all.
    Attached Files Attached Files
    Last edited by RandomP; 12-15-2011 at 06:36 PM.

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Concatenate values from columns and deleting duplicates

    Is this any use to you?

    http://www.excelforum.com/excel-prog...uplicates.html
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    11-23-2006
    Posts
    9

    Re: Concatenate values from columns and deleting duplicates

    Thank you Special-K for the answer. Actually no, it doesn't work for my data. I don't know why, since I know very little about VBA scripting.

    Maybe someone can help after all? I have tried searching, but without success unfortunately.

    Thank you again.

  4. #4
    Valued Forum Contributor
    Join Date
    08-29-2011
    Location
    Mississauga, CANADA
    MS-Off Ver
    Excel 2010
    Posts
    503

    Re: Concatenate values from columns and deleting duplicates

    Try this formula in the cell G2

    Please Login or Register  to view this content.
    Regards,
    Khaled Elshaer


    Remember To Do the Following....

    1. Thank those who have helped you by clicking the Star below the post.
    2. Mark your post [SOLVED] if it has been answered satisfactorily.

  5. #5
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Concatenate values from columns and deleting duplicates

    This works for your data

    Please Login or Register  to view this content.
    Please take time to read the forum rules

  6. #6
    Registered User
    Join Date
    11-23-2006
    Posts
    9

    Re: Concatenate values from columns and deleting duplicates

    Thank you Kelshaer and Steffen,

    Your formula and macro work for the data in the example. I just needed to tweak either of them now for when I have blank cells (it happens from time to time).

    Thank you again.

  7. #7
    Valued Forum Contributor
    Join Date
    08-29-2011
    Location
    Mississauga, CANADA
    MS-Off Ver
    Excel 2010
    Posts
    503

    Re: Concatenate values from columns and deleting duplicates

    Please mark the thread as solved
    Regards,
    Khaled Elshaer
    www.BIMcentre.com

    Remember To Do the Following....
    1. Thank those who have helped you by clicking the Star below their post.
    2. Mark your post SOLVED if it has been answered satisfactorily:
    • Select Thread Tools (on top of your 1st post)
    • Select Mark this thread as Solved

+ 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