The tutorial will teach you three quick and easy ways to add a line break in Excel cell: use a shortcut to type multiple lines, Find & Replace feature to add a carriage return after a specific character, and a formula to combine text pieces from several cells each starting in a new line.
When using Excel for storing and manipulating text entries, you may sometimes want a certain part of a text string to start in a new line. A good example of multi-line text could be mailing labels or some personal details entered in one cell.
In most Office applications, starting a new paragraph is not a problem - you simply press Enter on your keyboard. In Microsoft Excel, however, this work differently - pressing the Enter key completes the entry and moves the cursor to the next cell. So, how do you create a new line in Excel? There are three swift ways to do this.
How to start a new line in Excel cell
The fastest way to create a new line within a cell is by using a keyboard shortcut:
- Windows shortcut for line break: Alt + Enter
- Mac shortcut for line feed: Control + Option + Return or Control + Command + Return
In Excel 365 for Mac, you can also use Option + Return. Option is the equivalent of the Alt key on Windows, so it seems the original Windows shortcut (Alt + Enter) now works for Mac too. If it does not work for you, then try the traditional Mac shortcuts above.
If you are accessing Excel for Mac via Citrix, you can make a new line with the Command + Option + Return key combination.
To add a new line in Excel cell with a shortcut, please follow these steps:
- Double-click the cell where you want to enter a line break.
- Type the first part of the text. If the text is already in the cell, place the cursor where you want to break the line.
- On Windows, hold Alt while pressing the Enter key. In Excel for Mac, hold Control and Option while pressing the Return key.
- Press Enter to finish up and exit the edit mode.
As the result, you will get multiple lines in Excel cell. If the text still shows up in one line, make sure the Wrap text feature is turned on.
Tips to do a carriage return in Excel
The following tips show how to avoid common problems when inserting multiple lines in one cell and demonstrate a couple of unobvious uses.
Enable Wrap text
To see multiple lines in a cell, you need to have Wrap text enabled for that cell. For this, simply select the cell(s) and click the Wrap Text button on the Home tab, in the Alignment group. In some cases, you may also need to adjust cell width manually.
Add multiple line breaks to increase spacing between lines
If you'd like to have a gap of two or more lines between different text parts, press Alt + Enter twice or more times. This will insert consecutive line feeds within a cell like shown in the screenshot below:
Create a new line in formula to make it easier to read
Sometimes, it may be helpful to show lengthy formulas in multiple lines to make them easier to understand and debug. The Excel line break shortcut can do this too. In a cell or in the formula bar, place the cursor before the argument that you want to move to a new line and press Ctrl + Alt. After that, press Enter to complete the formula and exit the edit mode.
How to insert a line break after a specific character
In case you received a worksheet with many one-line entries, breaking each line manually might take hours. Luckily, there is an extremely useful trick to put multiple lines into all selected cells in one go!
As an example, let's add a carriage return after each comma in a text string:
- Select all the cells in which you want to start a new line(s).
- Press Ctrl + H to open the Replace tab of Excel's Find and Replace dialog. Or click Find & Select > Replace on the Home tab, in the Editing group.
- In the Find and Replace dialog box, do the following:
- In the Find what field, type a comma and a space (, ). If your text strings are separated by commas without spaces, type only a comma (,).
- In the Replace with field, press Ctrl + J to insert a carriage return. This will insert a line break in place of each comma; the commas will be removed. If you'd like to keep a comma at the end of each line but last, type a comma and then press the Ctrl + J shortcut.
- Click the Replace All button.
Done! Multiple lines are created in the selected cells. Depending on your input in the Replace with field, you will get one of the following results.
All commas are replaced with carriage returns:
A line break is inserted after each comma, keeping all the commas:
How to create a new line in Excel cell with a formula
The keyboard shortcut is useful for manually entering new lines in individual cells, and the Find and Replace is great for breaking multiple lines at a time. In case you are combining data from several cells and want each part to start in a new line, the best way to add a carriage return is by using a formula.
In Microsoft Excel, there is a special function to insert different characters in cells - the CHAR function. On Windows, the character code for the line break is 10, so we'll be using CHAR(10).
To put together the values from multiple cells, you can use either the CONCATENATE function or the concatenation operator (&). And the CHAR function will help you insert line breaks in between.
The generic formulas are as follows:
Or
Assuming the pieces of text appear in A2, B2 and C2, one of the following formulas will combine them in one cell:
=A2&CHAR(10)&B2&CHAR(10)&C2
=CONCATENATE(A2, CHAR(10), B2, CHAR(10), C2)
In Excel for Office 365, Excel 2019 and Excel 2019 for Mac, you can also use the TEXTJOIN function. Unlike the above formulas, the syntax of TEXTJOIN allows you to include a delimiter for separating text values, which makes the formula more compact and easier to build.
Here's a generic version:
For our sample data set, the formula goes as follows:
=TEXTJOIN(CHAR(10), TRUE, A2:C2)
Where:
- CHAR(10) adds a carriage return between each combined text value.
- TRUE tells the formula to skip empty cells.
- A2:C2 are the cells to join.
The result is exactly the same as with CONCATENATE:
Notes:
- For multiple lines to appear in a cell, remember to have Text Wrap enabled and adjust the cell width if needed.
- The character code for a carriage return varies depending on the platform. On Windows, the line break code is 10, so you use CHAR(10). On Mac, it's 13, so you use CHAR(13).
That's how to add a carriage return in Excel. I thank you for reading and hope to see you on our blog next week!
58 comments
HI,
Is there a way for a cell to display a text as if it were a carriage return, but without there being one?
I find that it makes it difficult to use the names of the cells where I have put carriage returns in formulas using f.e. the MATCH function. When there is a carriage return in the text that I want it to match to, the formula often is not working properly as it is not taking the full text. Even when I copy it including the carriage returns.
I want to keep my cells at the same width, but now, as I'm not using carriage return, the text is not as ledgible as I would like it to be.
So as example:
XXX xxxxxx xxxxx xx
With carriage returns would be
XXX
xxxxx
xxxxx
xx
But when you enter this in as a value to search in your MATCH function, it is not working until I take out all the carriage returns in both the cell and in the formula
Hello Katja!
We have a special tutorial that can help to solve your problem: How to remove carriage returns (line breaks) from cells in Excel. If you want to remove all non-printable characters from text, including line breaks, use CLEAN function.
For example:
=MATCH("xxxxxx", CLEAN(A1:A10),0)
The Windows shortcut for line break: Alt + Enter don't work.
Hi! This shortcut works. Please read the recommendations in the article above carefully.
Hi, thank you for your work on this solution.
I'm trying to run a 'find & replace' to swap (^p) with (Control + Option + Return) so that I can paste text from many cells in a word table into excel without splitting the cells, and then recover the linebreaks from the original formatting. However, when I try to run the replace, ^p is only replaced with a space, not a linebreak.
Please help!
Thank you
Hello Lucien!
Try using SUBSTITUTE function to replace the characters with linebreak. For example:
=SUBSTITUTE(A1,"^p",CHAR(10))
Set the cell format - Alignment - Wrap text. Read more: How to wrap text in Excel.
It would have been extremely helpful if you had reminded everyone to make sure the cell that contains the formula already has "Wrap Text" selected!
I spent almost an hour researching that and rolled my eyes when I came across the solution.
AMEN! I tried it three different ways and all appeared not to work until I read down to this comment...
Thanks for the citrix tip for the line break exactly what I was looking for
Thank you so much for this "If you are accessing Excel for Mac via Citrix, you can make a new line with the Command + Option + Return key combination." - I tried the other published shortcuts (Alt Enter) and it didn't work, but this tip did. Many thanks!!
Found your instruction via Google search. At first when I tried the "CHAR" formula, it didn't work. Turned out I forgot to put "&" after the formula.
Thank you!
Hai Team
i am not able to search the "," or "." in the below case in a cell.
000.460.50.48,001.460.15.48,001.460.16.48
My requirement is to convert "000.460.50.48,001.460.15.48,001.460.16.48" to
000.460.50.48
001.460.15.48
001.460.16.48
in a cell. Any idea?
Hello!
You can replace commas with line breaks manually, as described in the article above, or with the SUBSTITUTE function:
=SUBSTITUTE(A2,",",CHAR(10))
Don't forget to wrap the text in the formula cell as described in this article.
I am trying to use char(10) it is not working for me. Is there a way to see what character i should be using? Maybe 10 is not the right one to use? I dont know, can anyone help? I am on excel 2016
Hi!
If you wrote what you want to do, it would be easier for me to help you. My guess is that if you're on a Mac, use CHAR(13)
I found that CHAR(10), on a windows PC, alone doesn't work.
I used CHAR(13)&CHAR(10) worked fine and didn't require the wrap text selection.
This is the old computer carriage return (13) and line feed (10).
You do still need to make the cell tall enough for the double line of text.
Is there a way to have multiple lines of text in a cell, wrap the text and shrink the text to fit? When I select Wrap Text, Shrink to Fit, and Alt+Enter between my lines, my text is still getting cut off. I would like the size of my text to adjust to fit, but it doesn't. It stays at 9 pts.
When I select Shrink to Fit and deselect Wrap Text, my line break goes away. Thanks!
The line breaks will not be used and the text will appear smashed together unless unless Wrap Text is used. With Wrap Text, the line breaks will match the position of the CHAR(10) character, unless your cell width is too small to allow that.
I have an Excel workbook which I first started working on in Excel 2011 and was using the following:
&IF(INFO("system")="mac",CHAR(13),CHAR(10))&
This worked perfectly until I moved up to excel 2019 on a newer Mac and found that CHAR(13) doesn't work but CHAR(10) does. So now I have to incorporate an INFO("release")) into the test and check the first characters of the response for "14" or "16"
I assume that excel 2016 would respond with "15". Does anyone know if CHAR(13) or CHAR(10) should be used with Excel 2016. Perhaps I should just use CHAR(10)&CHAR(13) and forget the tests for both system and release since CHAR(10) appears to do nothing on older versions and CHAR(13) appears to do nothing on newer versions.
How could I ever thank you for all the information you provide for various problems. Still a big THANK YOU and GOD BLESS!
Great article. This helped when creating addresses for labels.
thanks, CHAR(10) was what i needed and you gave me