Carriage return character CHAR(10) and CHAR(13)

W

Wayne.Miller

I'm combining text from several cells into a single cell. Using the
concatenate function (or the & connection), a CHAR(13) will give me a
line break on the Macintosh. However, PC users do not get a line
break when they open the file. If I use CHAR(10) then it looks great
for PC users, but Mac users do not get a line break! Is there an easy
work around?

I'm using Excel 11.3.6 on a G5 Mac under system 10.4.10.
 
B

Bob Greenblatt

I'm combining text from several cells into a single cell. Using the
concatenate function (or the & connection), a CHAR(13) will give me a
line break on the Macintosh. However, PC users do not get a line
break when they open the file. If I use CHAR(10) then it looks great
for PC users, but Mac users do not get a line break! Is there an easy
work around?

I'm using Excel 11.3.6 on a G5 Mac under system 10.4.10.
No, there is no REAL easy work around. However you can do this with a
defined name. For example, define a name Lend (or whatever you like) and in
the refers to box, enter
=IF(LEFT(GET.WORKSPACE(1),3)="mac",CHAR(13),CHAR(10))


Then in a cell you can type text as: ="Line1"&lend&"line2"

Make sure the cell is "wrapped" and it will work fine on either platform.
 
J

jpdphd

I'm combining text from several cells into a single cell. Using the
concatenate function (or the & connection), a CHAR(13) will give me a
line break on the Macintosh. However, PC users do not get a line
break when they open the file. If I use CHAR(10) then it looks great
for PC users, but Mac users do not get a line break! Is there an easy
work around?

I'm using Excel 11.3.6 on a G5 Mac under system 10.4.10.

You can use the INFO() function to find out which OS is being used

put this expression into a cell
=IF(INFO("system")="mac",CHAR(13),CHAR(10))
give the cell a convenient name (eg LB, for line break)

then to combine the text in A1 and A2, use
=A1&LB&A2

hope it helps!
jpdphd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top