+ Reply to Thread
Results 1 to 9 of 9

Help with concatenate formula

  1. #1
    Registered User
    Join Date
    12-30-2013
    Location
    Elgin
    MS-Off Ver
    Excel 2013
    Posts
    52

    Help with concatenate formula

    Hello everyone,

    I am looking for help simplifying concatenate.

    What I want to do is take a bunch of cells and combine them into one cell. The problem with using concatenate, is it's a lot of cells and I've run out of room before.

    I want to combine all the contents from A1 to A30 into just B1. How would I do that? If possible I'd like to put a comma in between each entry.

    This
    C1
    C2
    C3
    C4
    C5
    C6
    C7
    C8
    C9
    C10

    into this
    C1, C2, C3, C4, C5, C6, C7, C8, C9, C10

  2. #2
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Help with concatenate formula

    Hi
    If data is in A2:A11 column use this formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and copy down

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Help with concatenate formula

    using formulas, there is no real easy way to do this. There is a way to use VBA for this, but I cannot find the link

    For the formula, try this...
    =SUBSTITUTE(TRIM(A1&" "&A2&" "&A3&" "&A4&" "&A5&" "&A6&" "&A7&" "&A8&" "&A9&" "&A10)," ",",")

    Another option, if you are OK using a helper column (which you can hide if you want) would be something like this...
    A
    B
    1
    2
    C1 C1
    3
    C2 C1,C2
    4
    C3 C1,C2,C3
    5
    C4 C1,C2,C3,C4
    6
    C5 C1,C2,C3,C4,C5
    7
    C6 C1,C2,C3,C4,C5,C6
    8
    C7 C1,C2,C3,C4,C5,C6,C7
    9
    C8 C1,C2,C3,C4,C5,C6,C7,C8
    10
    C9 C1,C2,C3,C4,C5,C6,C7,C8,C9
    11
    C10 C1,C2,C3,C4,C5,C6,C7,C8,C9,C10

    B2=SUBSTITUTE(TRIM(B1&" "&A2)," ",", ")
    copied down
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Help with concatenate formula

    Quote Originally Posted by José Augusto View Post
    Hi
    If data is in A2:A11 column use this formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and copy down
    Unless Im missing something, all that gives me is this?
    C
    1
    C1,
    2
    C2,
    3
    C3,
    4
    C4,
    5
    C5,
    6
    C6,
    7
    C7,
    8
    C8,
    9
    C9,
    10
    C10
    11

  5. #5
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Help with concatenate formula

    Hi FDibbins

    Sorry!
    formula is
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    where B1 is empty

  6. #6
    Registered User
    Join Date
    12-30-2013
    Location
    Elgin
    MS-Off Ver
    Excel 2013
    Posts
    52

    Re: Help with concatenate formula

    @FDibbins - For your second reply, I got the same result.

    For your first reply : That is similar to what I was doing. My problem with that was it really didn't make my process any simpler, as it takes so long to do. I have 500 lines (broken into groups between 3-50) that I am trying to reorganize. When I was doing this before, I had so many cells to combine, I actually ran out of room for typing in my formula.

    However you second method, with the helper column, could actually work. It's a little bit of work, and some cleaning up to do afterwards, but that might just do it.

    I guess it doesn't need to be a formula, just a method to do it. I was hoping I was missing some simple excel copy/paste command where you could paste into one cell instead of spreading it out.

    Edit: With Jose's added comment, that actually works, accomplishes the same thing FDibbins has, just less typing.

  7. #7
    Registered User
    Join Date
    12-30-2013
    Location
    Elgin
    MS-Off Ver
    Excel 2013
    Posts
    52

    Re: Help with concatenate formula

    I might be using this method. Can you explain what this formula means?

    I'm reading it as : This cell = The cell above, plus the one to the left of this cell. (=B1&A2) I get confused at the & IF(A3<>"",", ","") part.

    Thanks for the help.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Help with concatenate formula

    Jose's formula is doing pretty much the same as my 2nd suggestion (with the helper) is doing...without the SUBSTITUTE/TRIM bits to remove the trailing comma

  9. #9
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Help with concatenate formula

    Hi
    the IF statement is for comma in front C1, C2, ... but not in front C10,
    search this forum for "Concatenate Function Modification"
    Regards

+ 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. Replies: 9
    Last Post: 11-19-2014, 04:15 PM
  2. Replies: 2
    Last Post: 08-24-2014, 04:56 AM
  3. [SOLVED] Help with a CONCATENATE formula
    By Bandicoot in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-21-2013, 11:34 AM
  4. Replies: 2
    Last Post: 04-12-2010, 12:35 PM
  5. Replies: 1
    Last Post: 05-20-2009, 08:15 AM
  6. Replies: 1
    Last Post: 05-20-2009, 07:56 AM
  7. Evaluating results of a concatenate formula, as a formula
    By dodger in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-09-2005, 09:05 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