+ Reply to Thread
Results 1 to 9 of 9

Is there a way to combine text from multiple cells into one cell with a comma b/t?

  1. #1
    Registered User
    Join Date
    12-05-2014
    Location
    KCMO
    MS-Off Ver
    2010
    Posts
    9

    Is there a way to combine text from multiple cells into one cell with a comma b/t?

    Hi All,

    Is there a formula or function in excel that would allow me to combine text from several cells into one cell with a comma in between the text?

    So cell B2 says "He does well" and C2 says "Strong worker" and D2 says nothing, and E2 says "Doing Okay"

    I would like that combined into A2 to look like this - "He does well, Strong worker, Doing Okay"

    I believe I can do this "=B2&", "&C2" but I how do I do it for more cells? Also is there a way to ignore blank cells so there won't be a blank comma?

    Please let me know. You all have been great so far. Thanks!!!!!!
    Last edited by theresabirdoutthere; 12-05-2014 at 05:57 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    07-07-2014
    Location
    Washington DC
    MS-Off Ver
    2007
    Posts
    1,047

    Re: Is there a way to combine text from multiple cells into one cell with a comma b/t?

    Try this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Is there a way to combine text from multiple cells into one cell with a comma b/t?

    A2:
    Please Login or Register  to view this content.
    but you will likely want an if formula to determine if it is blank or not before adding a comma and a blank.
    Last edited by mikeTRON; 12-05-2014 at 05:58 PM.
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  4. #4
    Registered User
    Join Date
    12-05-2014
    Location
    KCMO
    MS-Off Ver
    2010
    Posts
    9

    Re: Is there a way to combine text from multiple cells into one cell with a comma b/t?

    Quote Originally Posted by mikeTRON View Post
    A2:
    Please Login or Register  to view this content.
    but you will likely want an if formula to determine if it is blank or not before adding a comma and a blank.
    Is there a formula that could do that?

  5. #5
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Is there a way to combine text from multiple cells into one cell with a comma b/t?

    I am sure there is a more elegant solution but I think this will be the most easy to understand:

    Please Login or Register  to view this content.
    It essentially checks if B2, then C2, then D2 then E2 are NOT nothing (where "" is nothing), if it is NOT nothing, then add it with a comma where needed.

  6. #6
    Valued Forum Contributor
    Join Date
    07-07-2014
    Location
    Washington DC
    MS-Off Ver
    2007
    Posts
    1,047

    Re: Is there a way to combine text from multiple cells into one cell with a comma b/t?

    This should work regardless of blanks:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Is there a way to combine text from multiple cells into one cell with a comma b/t?

    Quote Originally Posted by hoyasaxa215 View Post
    This should work regardless of blanks:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Nice, that is a much more slick solution.

  8. #8
    Registered User
    Join Date
    12-05-2014
    Location
    KCMO
    MS-Off Ver
    2010
    Posts
    9

    Re: Is there a way to combine text from multiple cells into one cell with a comma b/t?

    Hi All,

    First BIG THANKS to all of you! You have been awesome for this basic excel user!!! Seriously I would have been lost without you!

    I ended up using the following formula ...

    =if(B2<>"",B2,"")&if(C2<>"",", "&C2,"")&if(D2<>"",", "&D2,"")&if(E2<>"",", "&E2,"") - The only issue I am seeing is that if cell B is empty the results display with a comma starting the comments. Is there any way to have this not happen?

    unfortunately this one added addition commas that were needed - =SUBSTITUTE(TRIM(B2&" "&C2&" "&D2&" "&E2)," ",", ")

    Again you all are amazing!!!!!

  9. #9
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Is there a way to combine text from multiple cells into one cell with a comma b/t?

    So, can you post a sample dataset so we can see what you are working with?

    It is usually faster for me to see the data, create the formula and give it back then for you to tell me you have a problem, I fix it. Then you begin telling me all the one-off things we need to correct afterwards.

+ 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] 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
  2. Search cell for multiple text , return comma separated text in separate cell if found
    By dangerdoug in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-01-2013, 01:52 PM
  3. [SOLVED] Copy text from multiple cells and combine to one cell
    By villman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-13-2012, 12:01 AM
  4. Replies: 2
    Last Post: 12-03-2011, 03:51 AM
  5. Replies: 3
    Last Post: 04-27-2011, 12:59 AM

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