ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Carriage return during an if statement (https://www.excelbanter.com/excel-discussion-misc-queries/230960-carriage-return-during-if-statement.html)

kpt

Carriage return during an if statement
 
I have several cells combined and during the IF stament I want to use
carriage return to align stuff with in the cell. Any ideas?

Sheeloo

Carriage return during an if statement
 
Use CHAR(10)

=IF(A1=1,"First Line" & Char(10) & "Second Line","In one line only")

You may have to format the cell alignment as "Wrap Text"

"kpt" wrote:

I have several cells combined and during the IF stament I want to use
carriage return to align stuff with in the cell. Any ideas?


kpt

Carriage return during an if statement
 
Thank you
works great

"Sheeloo" wrote:

Use CHAR(10)

=IF(A1=1,"First Line" & Char(10) & "Second Line","In one line only")

You may have to format the cell alignment as "Wrap Text"

"kpt" wrote:

I have several cells combined and during the IF stament I want to use
carriage return to align stuff with in the cell. Any ideas?



All times are GMT +1. The time now is 02:52 PM.

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