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.
Adding a Line Break in Plain Text
This one is easy. While you’re editing the text of a cell, you 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 you 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.
Adding a Line Break 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 (
CHAR(13) on Mac). 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
13 for Mac) in this case refers to the character “Line Feed.”
B1 and add a formula to combine cells
A2 with a line break in between them. The formula to 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.