Excel Character for Line Return
In this article
Use the formula =CHAR(10) or the keyboard shortcut Alt+Enter to insert a line break inside a single Excel cell. This forces text to wrap onto the next line vertically, allowing you to display multi-line data without merging cells or using multiple columns. This works in all standard Excel versions for Windows and Mac.
What You'll Need
- A computer with Microsoft Excel installed (Desktop, Web, or Mobile).
- A cell containing text that you want to split into multiple lines.
- Access to the formula bar or the ability to type directly into a cell.
Step-by-Step
-
Select the cell where you want the line break to appear. You can click directly on the cell border or click inside the cell content to place your cursor at the exact spot where the line should begin.
-
For Windows Users: Hold down the Alt key on your keyboard and, while keeping it held down, press the Enter key (Alt + Enter). You will not see any visual cue that anything has happened immediately, but the cursor will move to the next line within the same cell.
-
For Mac Users: Hold down the Control key and press the Command key together (Ctrl + Cmd + Enter). This is the standard keyboard shortcut for a line break in macOS applications, including Excel.
-
Continue typing on the new line. You can type as many lines as you need within that single cell. Excel will automatically expand the height of the row to accommodate the text as you add more lines.
-
Press Enter or Tab to exit the cell and save your changes. The text will now appear as paragraphs stacked vertically within the single cell.
Common Mistakes
- Text Not Wrapping: Simply inserting a line break using the shortcut or formula will not make the text wrap to the next line if the "Wrap Text" setting is turned off. The text will overflow into the adjacent cell. To fix this, select the cell, go to the Home tab, and click the Wrap Text button.
- Formula Syntax Errors: If using the =CHAR(10) method, ensure you are using standard text quotes. The formula should look exactly like
="First Line" & CHAR(10) & "Second Line". If you forget the quotes around the text strings, Excel will treat the text as a number or reference and return an error. - Cell Height: If the lines are cut off or you see #### symbols, the row height is too small to fit the text. Double-click the bottom boundary of the row header (the number on the far left) to auto-fit the height to the content.
Tips
- Conditional Formatting: You can use the CHAR(10) character in conditional formatting rules. For example, you can highlight a cell with a specific status in red if it contains a line break, allowing you to visually separate positive from negative feedback within a single cell.
- Filtering: Unlike merged cells, cells containing line breaks can still be filtered. This makes them excellent for lists of addresses, bullet points, or sentences that you need to sort or filter without breaking the layout.
- Importing Data: When pasting data from a web page or another spreadsheet that uses line breaks, you may need to use the Find & Replace function. Press Ctrl+H, find a standard space or comma, and replace it with the line break character to clean up your data.
Troubleshooting
If your text is not displaying correctly, start with these checks in the order listed:
- Check Wrap Text: Select the cells in question and look at the Home tab. If the Wrap Text icon is not highlighted, the text will run off the edge of the screen. Click it to enable text wrapping.
- Verify the Character: If you are using a formula, click on the formula bar and type
CHAR(10)into an empty cell. If it returns a square box or nothing, your version of Excel may use a different character code (such as 11 or 13) depending on your locale settings. Check your spreadsheet's system settings to confirm which character code represents a line break in your region. - Adjust Row Height: If the rows appear squashed or contain #### symbols, double-click the line between the row numbers (the row header) to force Excel to resize the row to fit the content. You can also right-click the row number and select Row Height to set a specific pixel value if the auto-fit is too small.
Frequently Asked Questions
Does Alt+Enter work on Excel for iPad or Android?
Yes, the keyboard shortcut for line breaks is generally consistent across mobile versions of Microsoft Office. On touch devices, you can also tap the cell to bring up the formula bar, place your cursor in the formula bar, and use the shortcut Ctrl+Enter (or Cmd+Enter on Mac) to create the line break.
Why does the line break show as a square box?
A square box usually indicates that the font used in the cell does not support the specific line break character or that the character code is incorrect for your region. Ensure that the font is a standard one like Arial or Calibri, and verify that you are using the correct character code for your Excel version.
Can I use this to merge multiple columns into one?
Yes, you can combine data from two columns into a single cell by adding a space and a line break. For example, =A2 & " " & CHAR(10) & B2 will display the content of column A on the first line and column B on the second line within the same cell.
Does this work in Excel Online?
Yes, Excel Online supports Alt+Enter for line breaks and the Wrap Text formatting feature. The functionality is identical to the desktop version for standard text operations.
How do I remove a line break?
To remove a line break, click into the cell and position your cursor just before the line break (which will appear as a small arrow). Press Backspace or Delete to remove it. If you are using a formula, you can replace CHAR(10) with an empty string "" to remove the line breaks programmatically.
Is there a limit to how many lines I can have?
Excel does not have a hard limit on the number of lines you can add to a single cell, but there is a practical limit based on memory and display size. Extremely long text blocks can slow down calculation times and may be difficult to read in standard views.