As a formula:
=a1&char(10)&"This is the second line"&char(10)&text(b1,"$#,##0.00")
(and format the cell for wraptext--or you'll see a little box for that
char(10).)
As input, you hit alt-enter to force a new line within the cell.
in code:
dim myStr as string
mystr = "Something" & vbnewline & "something else" & vblf & "a third thing"
vbnewline will work for both Mac's and PC's.
vbLf is enough for PC's.
A1=Apple B1=Orange
I was expecting by this formula to get:
Apple
Orange (In two lines in a cell)
But I get:
AppleOrange
Char(10) didn't work for me.
I am using Excel 2003
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.