Saturday, April 14, 2012

Add Line Break in Cell or Formula

Add a line break when typing in a cell

  1. Select the cell
  2. In the formula bar, click where you want the line break
  3. On the keyboard, press Alt + Enter, to add a line break
  4. Press Enter, to complete the formula

The cell will automatically be formatted with Wrap Text, and you might need to widen the column.

 
 

Add a line break in a formula

  1. Select the cell
  2. In the formula bar, click in the formula, where you want the line break
  3. To add a line break use this character, with the & operator:
  4. CHAR(10)
  5. Press Enter, to complete the formula

For example, change this formula:
="Total amount is: " & SUM(C1:C6)
to this:
="Total amount is: " & CHAR(10) & SUM(C1:C6)

 
 

Turn on Wrap Text

When you add a line break to a formula, the cell is NOT automatically formatted with Wrap Text, so you might need to turn that feature on.
Otherwise, you will see a small box where the line break should be.

 
 

To turn on Wrap Text:

  1. Select the cell
  2. On the Excel Ribbon, click the Home tab
  3. In the Alignment group, click Wrap Text.

No comments:

Post a Comment