wrapping text in an if statement

G

Guest

I want to force the text in an if statement to go to the
next line... I tried to place a ALT Return at the
appropriate place but I get a empty box instead of two
lines of text.

Example
IF ($A$1,"one line
two lines","line one
line two")

and I get one line0two lines

but what I want is
one line
two lines

any help??
 
D

David

try:
"one line"&char(10)&"two lines" and set the cell format to wrapped text
worked for me
 
B

Bernie Deitrick

Format the cell for wrapped text, then use the formula:

=IF($A$1,"one line"&CHAR(10)&"two lines","line one"&CHAR(10)&"line two")

HTH,
Bernie
MS Excel MVP
 

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