+ Reply to Thread
Results 1 to 5 of 5

Combining multiple cells with text

  1. #1
    Registered User
    Join Date
    12-09-2009
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2007
    Posts
    61

    Combining multiple cells with text

    Column A are various names of which many are duplicated.
    Column B are various text phrases associated with the names in column A.

    I would like to make a function in column C that will combine the text in column B into the the corresponding cell in column C that represents the first instance of a name in column A.

    So here is an example of what I would like to do:

    Column A
    Name A
    Name A
    Name B
    Name C

    Column B
    Yellow
    Purple
    Red
    Blue

    Column C
    Yellow, Purple
    (Blank)
    Red
    Blue

    Any suggestions?
    Last edited by dforte; 08-05-2010 at 09:31 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Combining multiple cells with text

    You can use a free addin function from here: http://download.cnet.com/Morefunc/30...-10423159.html

    and then assuming your are in row 2 to start, apply formula in C2

    Please Login or Register  to view this content.
    and adjust ranges to suit, then confirm with CTRL+SHIFT+ENTER not just ENTER and copy down.

    If you don't want to use the addin, then apply this UDF to your VB Editor (ALT+F11, then INSERT|MODULE and paste this code:

    Please Login or Register  to view this content.
    and apply formula as above in C2:

    Please Login or Register  to view this content.
    adjust ranges and confirm with CTRL+SHIFT+ENTER and copy down.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    12-09-2009
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2007
    Posts
    61

    Re: Combining multiple cells with text

    This is awesome and almost exactly what I need. I decided to go with the VB Editor option. There's just two problems:

    1. My column B as explained above is not always one word, so right now each word is separated by a comma. It would be great if I could separate the entire contents of each cell that is combined with a comma rather than each word from each cell.

    2. Some phrases in column B are duplicated as well, and it would be great if they could only appear once in the output column C cell.

    Thanks again.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Combining multiple cells with text

    Assuming you can sort your data by column A first, then by column B (which would be easiest way to solve), in C2 add formula:

    Please Login or Register  to view this content.
    copied down

    Then in D2 use formula:

    Please Login or Register  to view this content.
    adjust ranges and confirm with CSE key combo.

  5. #5
    Registered User
    Join Date
    12-09-2009
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2007
    Posts
    61

    Re: Combining multiple cells with text

    Makes sense! Thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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