Hard Line feeds characters within a formula

J

James Clements

When typing text into a cell, you can get a line feed
within the cell by pressing "ALT+Enter".

My question is how do I enter the equivalent return in a
formula where I want the results of the formula dislayed on
separate lines within the cell displaying the results.

I have tried the CHAR() function with all the codes 0 to 255
and that does not work. Also placing text like .alt+enter
in another cell and then referring to that cell in the
formula results in "text .(nonprinting char) text"

I would appreciate anyone with a solution to this .

Thanks much, Jim
 
C

Chip Pearson

Jim,

Use CHAR(10) . E.g.,
="Line 1" &CHAR(10) &"Line 2"

You must set the Wrap Text property of the cell to true --
otherwise, you'll just see a sqaure character. Go to the Format
menu, choose Cell, then the Alignment tab. There, check "Wrap
text".
 
J

James Clements

Chip,

Thanks Much ... I had the forumla and CHAR(10) done right
I just had not remembered to turn wrap text on

Regards, Jim
 

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