How can I enter carriage returns into text within a cell in excel

G

Guest

I am trying to use excel to create a table full of text. I would like to be
able to format the text within the cell (e.g. entering carriage returns to
put some text on a separate line). I can't seem to make this work. Any
suggestions?
 
D

David McRitchie

Hi Lizzy,
Adding to Andrew's reply.

Use Alt+Enter
which inserts a CHAR(10) for a new line, and turns on cell wrap in format,cells,alignment

within a concatenation
=A1 & CHAR(10) & B1
and you must turn on cell wrap yourself in Format, cells, alignment

within a concatenation in VBA
newstring = Oldstring & CHR(10) & Morestring

Failure to turn cell wrap will result in viewing a square printer's bullet, which
is an indication of a character not in the character set you are using..


--
 

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