New Line

R

Ronald Dodge

Within a formula, how do I put in a new line? I have tried various ways
only to be getting the vertical bar instead. In VBA, one would use the
vbCrLf constant, like within a Msgbox, when just typing in straight text
within a cell, one would use the Alt-Enter to put in a new line, and I have
also tried both, Char(10) and Char(13).
 
C

Chip Pearson

Ronald,

Use CHAR(10) . E.g.,

="first" &CHAR(10)&"next"

Note that Wrap Text must be checked in the Format, Cells,
Alignment settings. Otherwise, you'll get a square character.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com (e-mail address removed)
 
R

Ronald Dodge

Thank you Chip as I didn't realize the Wrap Text needed to be checked, as
there's no other mention of this within Excel's documentations (To my
knowledge).
 

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