How to get NewLine in a cell?

G

Guest

When inputting data into a cell I can Alt-Return to force a new line in that
cell.
Checking what code gets entered I see that it is Char(10). (Btw, the "Char"
is my guess from a Swedish system, but you know what it is in English).

Anyhow writing ="A" & Char(10) & "B" results in an "unknown" character to be
shown between A and B, not a NewLine.

And, in fact writing =A1 in a cell, where A1 refers to a cell where "A"
NewLine "B" has been entered manually results in the same output (A "unknown"
B).

Is there a way to combine the contents of two cells into subsequent lines in
one cell? (preferably without using a macro).

Kind regards / Ake
 
G

Guest

Sure thing, worked nicely.
It seems Alt-Return does that for you automagically when you manually enter
multiline data.

Thanks / Ake
 
G

Guest

This doesn't seem to work on a Mac. I'm wondering if the character set is
different. Should I be using CHAR(something_else)?
 
N

NickHK

You can test for the code by putting =Code(A1) in cell A2, then just
entering an ALT+ENTER in A1. See what value you get.
I would have thought it would be 10, but...

NickHK
 

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