+ Reply to Thread
Results 1 to 16 of 16

Need to combine cells to one string of text if duplicate values exist in multiple cells

  1. #1
    Forum Contributor
    Join Date
    01-06-2015
    Location
    Huntsville, AL
    MS-Off Ver
    Office 365
    Posts
    185

    Need to combine cells to one string of text if duplicate values exist in multiple cells

    What I have is Column A with values that may be the same. The text in Column A might be duplicated up to 30 times in Column A, in multiple cells. In Column B I have unique values or text. I would like to make all the unique values in column B1, B2, or B3 etc in a long string of text, if the text in Cell A1 matches A2, or A3, Etc. I have attached an example sheet that will explain it better than what I can. I assume this will need to be done with a macro, but I don't know where to start. Thanks,

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

    Re: Need to combine cells to one string of text if duplicate values exist in multiple cell

    No example attached.

    The paper clip method does not work on this forum.
    To attach a file click Go Advanced at the bottom of this page and scroll down to Manage Attachments.
    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
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Need to combine cells to one string of text if duplicate values exist in multiple cell

    Chris, do the unique values get combined into one long string without any separators at all? and no spaces?

    Where does the output go?
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  4. #4
    Forum Contributor
    Join Date
    01-06-2015
    Location
    Huntsville, AL
    MS-Off Ver
    Office 365
    Posts
    185

    Re: Need to combine cells to one string of text if duplicate values exist in multiple cell

    Here is the attachment
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    01-06-2015
    Location
    Huntsville, AL
    MS-Off Ver
    Office 365
    Posts
    185

    Re: Need to combine cells to one string of text if duplicate values exist in multiple cell

    Arkadia, I would like them to be separated by comma's. The output could go on a new sheet if possible. Thanks,

  6. #6
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Need to combine cells to one string of text if duplicate values exist in multiple cell

    So both the column A and B values should output into just one column? or you want column A to have the column A value and column B to have all the joined column B values?

  7. #7
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Need to combine cells to one string of text if duplicate values exist in multiple cell

    This code will generate output matching your example:

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    01-06-2015
    Location
    Huntsville, AL
    MS-Off Ver
    Office 365
    Posts
    185

    Re: Need to combine cells to one string of text if duplicate values exist in multiple cell

    All in the same column of possible. If they were separate columns that would be okay.

  9. #9
    Forum Contributor
    Join Date
    01-06-2015
    Location
    Huntsville, AL
    MS-Off Ver
    Office 365
    Posts
    185

    Re: Need to combine cells to one string of text if duplicate values exist in multiple cell

    Arkadi, how would you make it keep the value of column A in Column A and the rest in Column B in a string of text?

  10. #10
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Need to combine cells to one string of text if duplicate values exist in multiple cell

    Chris, since we posted at the same time, you may not realise that I posted my last post with code, so I'm just posting this so that it shows I have a new post...

  11. #11
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Need to combine cells to one string of text if duplicate values exist in multiple cell

    Oh... well you said all in one, I originally had it in A and B... simple, change:

    Please Login or Register  to view this content.
    to:
    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    01-06-2015
    Location
    Huntsville, AL
    MS-Off Ver
    Office 365
    Posts
    185

    Re: Need to combine cells to one string of text if duplicate values exist in multiple cell

    You are a genius Arkadi. Thanks a million!!!

  13. #13
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Need to combine cells to one string of text if duplicate values exist in multiple cell

    Lol, not a genius at all, but thanks, I appreciate the rep points and that you marked the thread as solved!

  14. #14
    Forum Expert
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,513

    Re: Need to combine cells to one string of text if duplicate values exist in multiple cell

    'arkadi with same problem how to conection with array
    Please Login or Register  to view this content.

  15. #15
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Need to combine cells to one string of text if duplicate values exist in multiple cell

    Daboho are you suggesting that as an alternative? Or saying you need help?

  16. #16
    Forum Expert
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,513

    Re: Need to combine cells to one string of text if duplicate values exist in multiple cell

    I need help arkadi

+ 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] Need to find if duplicate values exist in a column, concatenate cells and then delete
    By Siemieniuk in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-22-2017, 07:22 PM
  2. Combine text from multiple cells based on criteria from other cells
    By t2cool in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-07-2017, 12:03 PM
  3. [SOLVED] Combine values from multiple cells into one cell, then delete duplicate lines
    By Ocean Zhang in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-21-2015, 07:01 PM
  4. [SOLVED] Combine multiple cells text into one cell, skip blank cells.
    By T15K in forum Excel General
    Replies: 6
    Last Post: 12-05-2014, 09:49 PM
  5. Replies: 4
    Last Post: 07-21-2014, 10:33 AM
  6. [SOLVED] Find if duplicate values exist in a column, concatenate cells and then de
    By filky in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-15-2014, 10:14 PM
  7. Replies: 8
    Last Post: 04-12-2012, 08:02 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