+ Reply to Thread
Results 1 to 9 of 9

Carriage returns in a concatenate formula ?

  1. #1
    Registered User
    Join Date
    10-26-2010
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    4

    Question Carriage returns in a concatenate formula ?

    Hi
    I have searched but to no avail, I hope I am not duplicating a previously answered question.

    I want to use a concatenate formula to merge the contents of three columns, these are address fields, into a single column. I have done this using
    Please Login or Register  to view this content.
    But I'd like to have a carriage return between the three values so C2 Carriage return D2 Carriage return E2

    So I end up with the data appearing like this in the single cell within the concatenated column:

    Address line 1
    Address line 2
    Address line 3

    Is this possible ?
    I really hope so, because I have a spreadsheet with just under 9,800 entries and this would save me days of heart ache.

    Many thanks in advance for any help you can give.
    Regards
    Simon

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

    Re: Carriage returns in a concatinate formula ?

    Try:

    =CONCATENATE(C2,CHAR(10),D2,CHAR(10),E2)

    then format with Wrap Text.
    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
    10-26-2010
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Carriage returns in a concatenate formula ?

    Thank you !
    This would appear to be the solution.
    Many thanks

    Simon

  4. #4
    Registered User
    Join Date
    10-26-2010
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Carriage returns in a concatenate formula ?

    Hummm, so I have three columns, that I have concatenated beautifully thanks to your formula.

    But sometimes there is no value in one of the columns, but we have programmed the formula to insert a carriage return. Obviously sometimes this is redundant and it would be fantastic if we could insert a clause to say

    'if there isn't a value in that cell, don't bother with the carriage return on that occasion'

    Is this possible ?

    Thanks.

    Simon.

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Carriage returns in a concatenate formula ?

    Perhaps:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    10-26-2010
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Carriage returns in a concatenate formula ?

    Amazing !
    You are a God amongst men :-)

    The amount of hours work you have just saved me. I had 10,000 rows to edit and if you hadn't helped with this formula it looked like I would have had to manually adjust them all.

    Thank you so much !

    Regards
    Simon
    Last edited by SimonL; 10-27-2010 at 07:55 AM. Reason: spelling

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

    Re: Carriage returns in a concatenate formula ?

    Here's another way...

    =CONCATENATE(C2,IF(D2="","",CHAR(10)),D2,IF(E2="","",CHAR(10)),E2)

  8. #8
    Registered User
    Join Date
    04-02-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Carriage returns in a concatenate formula ?

    Hi All,
    I am trying to do almost the same thing, except that I am concatenating two cells that have multiple entries already:

    Cell A Cell B
    74 176
    180 179

    I would like to end up with all values in one cell:
    74
    180
    176
    179

    What I am getting is this:
    74
    180176
    179

    I would greatly appreciate any help with this. I have about 2900 rows with various values to contend with.

    Thank you so much,
    G.

  9. #9
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Carriage returns in a concatenate formula ?

    gerrig20,

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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