+ Reply to Thread
Results 1 to 13 of 13

Char (10) function not working

  1. #1
    Registered User
    Join Date
    05-10-2012
    Location
    Delhi, India
    MS-Off Ver
    Excel 2010
    Posts
    5

    Char (10) function not working

    I have attached a sample file where I want to concatenate data in colums A2:H2 into one column with line breaks. But CHAR(10) function alonwith CONCATENATE is not working. I have formatted the destination cell for wrap text. Please help.
    Attached Files Attached Files
    Last edited by saigalp; 08-09-2012 at 07:11 AM.

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Char (10) function not working

    You need to use CHAR(10) and CHAR(13):

    =A2 & CHAR(10) & CHAR(13) & B2 & CHAR(10) & CHAR(13) & C2 & CHAR(10) & CHAR(13) & D2 & CHAR(10) & CHAR(13) & E2 & CHAR(10) & CHAR(13) & F2 & CHAR(10) & CHAR(13) & G2 & CHAR(10) & CHAR(13) & H2

  3. #3
    Registered User
    Join Date
    05-10-2012
    Location
    Delhi, India
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Char (10) function not working

    Sorry, Andrew-R, but this also does not work. I need to have the data in the form of a address label in one colummn. Concatenate is working but line break function is not working.
    Last edited by saigalp; 08-09-2012 at 08:19 AM.

  4. #4
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Char (10) function not working

    how about???
    =CONCATENATE(A2,CHAR(10),B2,CHAR(10),C2,Char(10),D2,char(10),E2,char(10),F2,char(10),G2)
    wrap the cell then adjust the width of the column, center justified,center align.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  5. #5
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Char (10) function not working

    if that doesn't work try this one.

    say =CONCATENATE(A3,"@",B3,"@",C3)
    instead of the @ sign press alt+enter so the formula will become like below

    =CONCATENATE(A3,"
    ",B3,"
    ",C3)

    alt+enter will force the breaks.
    so oo...

    then if this is what you want just fill down the column.

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Char (10) function not working

    I see no reason why you can't get CHAR(10) to work when the cell is formatted to wrap unless your column width is less than the width of the longest cell to be concatenated.

    Taking the above solutions a step further this will discount blank cells.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Marcol; 08-09-2012 at 09:27 AM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  7. #7
    Registered User
    Join Date
    05-10-2012
    Location
    Delhi, India
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Char (10) function not working

    Thanks for the solution. Works perfectly.

    ---------- Post added at 06:55 PM ---------- Previous post was at 06:48 PM ----------

    Thanks for the reply.

  8. #8
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Char (10) function not working

    This might save you a little typing.
    Drag the formula in A7 down, and in B7 across then down.

    The result is in column H
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    05-10-2012
    Location
    Delhi, India
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Char (10) function not working

    O.K. Thanks.

  10. #10
    Registered User
    Join Date
    03-08-2014
    Location
    cairo
    MS-Off Ver
    Excel 2010 plus
    Posts
    1

    Re: Char (10) function not working

    many thanks vlady
    wrap works with me ... Shift+R improves the quality ** this image. CTRL+F5 reloads the whole page.

  11. #11
    Registered User
    Join Date
    10-28-2017
    Location
    USA
    MS-Off Ver
    14.7.7
    Posts
    1

    Re: Char (10) function not working

    Im using Excel 14.7.7 and CHAR(10) function is not working to put cells on different lines. I tried wrap text. Please help

  12. #12
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Char (10) function not working

    @ baby95120
    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

  13. #13
    Registered User
    Join Date
    04-01-2020
    Location
    Cheshire, England
    MS-Off Ver
    Office 2020, version 14.007237.5000
    Posts
    1

    Re: Char (10) function not working

    I struggled for quite a while and none of this seemed to work for me at all until I discovered the following:

    Unless the cell's format has been set to word wrap, Excel will not display the contents of the cell with its newlines but just as one single line of text without newlines.
    As soon as I changed the format to word wrap suddenly all the newlines I'd inserted with CHAR(10) etc. . appeared.
    What make this less obvious to spot is that if you enter text into a field with newlines (using Alt-Enter), Excel automatically sets the format of the cell to word wrap.

+ 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