Force a new line in a cell with "wrap text" on

D

DRARetired

How can I put a newline command in a cell formula? I've
tried using Alt-Enter, but it doesn't work.
 
D

David McRitchie

In a Worksheet use CHAR(10)
in a macro use CHR(10)

Alt+Enter automatically turns on Cell Wrap. This won't
so you may have to format the cells yourself.
Format, cells, Alignment (tab), turn on wrap cells
 
D

draretired

The text display of a formula.
my formula is:
=TEXT(Calendar+(ROW(D2)-ROW(Calendar))*7/2+(COLUMN(D2)-
COLUMN(Calendar)),"d")& NEWLINE OFFSET(List!$C$1,(ROW(D2)-
ROW(Calendar))*7/2+(COLUMN(D2)-COLUMN(Calendar)),0)

The the first line is a date and otherlines are text.

Thanks,
Don
 
G

Guest

The char(10) worked.

Thanks,
Don
-----Original Message-----
In a Worksheet use CHAR(10)
in a macro use CHR(10)

Alt+Enter automatically turns on Cell Wrap. This won't
so you may have to format the cells yourself.
Format, cells, Alignment (tab), turn on wrap cells
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

How can I put a newline command in a cell formula? I've
tried using Alt-Enter, but it doesn't work.


.
 
Top