When entering text into a cell, sometimes we’d like to insert a line break for better formatting. A line break is like when you’re in Word and you press Enter to create a new line. This can also be called a carriage return. We’ll cover two ways to do this.
- Line breaks in plain text
- Line breaks in cell formulas
One thing is certain, you shouldn’t use two cells for creating the illusion of line breaks.
Line Breaks in Plain Text
This one is easy. While I’m editing the text of a cell, I can simply press
Command+Option+Enter for Mac) to add a line break as shown below.
NOTE: This will automatically set Wrap Text ON for cell
Let’s take a look at what happens when I turn Wrap Text OFF:
Notice that in the formula bar the break is kept there, but it is one single line in cell
A1. This is because Excel needs to format the break and Wrap Text is the way to do it. The formula bar is immune to show any formatting, but it will show you the data you have (in this case, some text, then a line break and some more text after). It’s just another way to show you that you have a break in the cell, but it’s not formatted to show it that way.
Line Breaks in Cell Formulas
To enter a line break in a cell formula, reference the text and concatenate it with the ampersand (or you can use the
CONCATENATE() function) along with the function
CHAR(10) to insert the break. The
CHAR() function takes in an integer and will show a character based on that integer. Please see Microsoft’s page on the CHAR() function for more info. The
10 in this case refers to the character “Line Feed.”
I put text into
A2 and in
B1 I want to put them together and add a break in between them. The formula I use is:
Notice this time that Excel does not automatically turn on Wrap Text when we enter the line break as a formula. You have to manually turn it on to get the formatting you want. Here is the formula with Wrap Text turned on.