Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

1,766 views
Skip to first unread message

Wayne....@gat.com

unread,
Aug 1, 2007, 3:17:35 PM8/1/07
to
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.

Bob Greenblatt

unread,
Aug 1, 2007, 4:46:51 PM8/1/07
to
On 8/1/07 3:17 PM, in article
1185995855.5...@d30g2000prg.googlegroups.com,
"Wayne....@gat.com" <Wayne....@gat.com> wrote:

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.

--
Bob Greenblatt [MVP], Macintosh
bobgreenblattATmsnDOTcom

jpdphd

unread,
Aug 1, 2007, 4:53:37 PM8/1/07
to

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

0 new messages