Excel - New Lines within a Cell

Soldato
Joined
20 Feb 2004
Posts
22,572
Location
Hondon de las Nieves, Spain
I know when entering text you can hit "ALT+ENTER" to start a new line. However this doesn't seem to work when using formulas annoyingly.

I have 3 columns of data

Count
Revenue
Margin

These are organised into columns of ranking (AA, AB, AC, BA, BB, BC etc). I want to show them in a table like this

wX0L8p9.png


However i can't seem to get the formatting to work. As such as i start using a formula it concatenates everything onto a single line.

Anyone have any idea if what i want to do is possible?
 
Google to the rescue, just a case of finding the right search description

Solution

Inserting Line Breaks Using Formulas

If you’re working with text data and want to insert line break in Excel formula results, you can do that as shown below.

  1. In the formula, where you want to insert a line break, add Char(10).
    • For example, instead of =A1&A2, use =A1&Char(10)&A2.
      CHAR formula returns the character based on the ASCII code. And in this case, 10 represents the ACSII code for a line break.
  2. Select the cell with the formula, go to Home –> Alignment –> Wrap Text
    • If the Wrap Text is NOT applied, adding Char(10) would make no changes in the formula result.
Insert-Line-Break-in-Excel.png


Note: If you are using Mac, use Char(13) instead of Char(10).
 
Back
Top Bottom