ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I use a formula to create a new line of text in a cell? (https://www.excelbanter.com/excel-worksheet-functions/100173-how-do-i-use-formula-create-new-line-text-cell.html)

Jon Shelton

How do I use a formula to create a new line of text in a cell?
 
I'm trying to concatenate address components (Address Line 1, Address Line 2,
City, State, and Zip Code) from their individual cells into a single cell
that is formatted correctly in 2 or 3 lines of text. In my formula, I'm
trying to find a way to output Address Line 1, start a new line, put Address
Line 2 on the new line, start a new line, and put the City, State, and Zip on
the last line.

a7n9

How do I use a formula to create a new line of text in a cell?
 

You cannot use a function to create a new line. Worksheet functions can
only return values in the cells they are referred to, they cannot
change any thing other than that. You'd have to use VBA to achieve
that.


--
a7n9


------------------------------------------------------------------------
a7n9's Profile: http://www.excelforum.com/member.php...o&userid=32149
View this thread: http://www.excelforum.com/showthread...hreadid=562924


Gord Dibben

How do I use a formula to create a new line of text in a cell?
 
Jon

=A1 & CHAR(10) & B1 & CHAR(10) & C1 will give you 3 lines of text.

Format to "wrap text"


Gord Dibben MS Excel MVP


On Wed, 19 Jul 2006 08:56:03 -0700, Jon Shelton <Jon
wrote:

I'm trying to concatenate address components (Address Line 1, Address Line 2,
City, State, and Zip Code) from their individual cells into a single cell
that is formatted correctly in 2 or 3 lines of text. In my formula, I'm
trying to find a way to output Address Line 1, start a new line, put Address
Line 2 on the new line, start a new line, and put the City, State, and Zip on
the last line.




All times are GMT +1. The time now is 05:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com