Press Alt+Enter to move text to the next line within the same cell

When you want text to wrap to a second line inside a single Excel cell instead of spilling into the next cell, use Alt+Enter on Windows or Control+Option+Enter on Mac. This creates a line break within that cell and keeps all your text contained in one place.

The cursor will jump to the next line inside the cell. You can keep pressing Alt+Enter as many times as you need to create multiple lines. When you press Enter without the Alt key, Excel saves the cell and moves you down to the next row instead.

Key Takeaways

  • Alt+Enter (Windows) or Control+Option+Enter (Mac) creates a line break inside a cell without moving to the next row.
  • Excel automatically adjusts the row height to fit multiple lines, but you can manually set it taller if text gets cut off.
  • Text wrapping and line breaks are different — line breaks force text to specific positions, while wrapping flows text based on column width.
  • Line breaks stay in place even if you resize columns, making them useful for labels, instructions, or multi-line headers.

When to use line breaks instead of separate cells

Use a line break when you want related information to stay together in one cell. Common situations include adding a second line to a header, writing instructions that belong in a single cell, or creating a label with a subtitle underneath.

If you have a spreadsheet tracking projects, for example, you might put the project name on the first line and the important date on the second line within the same cell. This keeps the information paired and makes the spreadsheet easier to read without creating extra columns.

How Excel handles row height with multiple lines

When you add a line break, Excel automatically makes the row taller to show all the text. If the row height is set to automatic (the default), you will see both lines without doing anything else.

If your text is still getting cut off, the row height may be manually set to a fixed size. Double-click the border between two row numbers on the left side of the spreadsheet to auto-fit the height. Or right-click the row number, select "Row Height", and enter a larger number in points.

The difference between line breaks and text wrapping

Text wrapping automatically breaks text to fit the column width — if you make the column narrower, the text flows to more lines. Line breaks force text to specific positions using Alt+Enter, so the breaks stay in the same place no matter how wide the column is.

To turn on text wrapping for a cell, select it, then go to the Home tab and click "Wrap Text" in the Alignment group. You can combine both: use text wrapping for automatic flow and Alt+Enter for manual breaks at specific points.

Editing and removing line breaks

To edit a cell with line breaks, double-click the cell or press F2 to enter edit mode. Use the arrow keys to move between lines. To delete a line break, position your cursor at the end of the line before the break and press Delete.

If you want to remove all line breaks from a cell at once, you can use Find & Replace. Press Ctrl+H (Windows) or Command+H (Mac), click "Options", then check "Regular expressions". In the Find field, enter ~ (tilde) and leave the Replace field empty. This removes all line breaks in the selected cells.

Line breaks in formulas and imported data

If you are building a formula that combines text from multiple cells, you can add a line break using the CHAR function. The formula =A1&CHAR(10)&B1 puts the contents of A1 on the first line and B1 on the second line within the result cell. CHAR(10) is the code for a line break.

When you import data from another source, line breaks may already be present but hidden if text wrapping is off. Turn on text wrapping to see them, or use Find & Replace with CHAR(10) to find and remove them if they are causing problems.

Frequently Asked Questions

Why does my line break look like a small box or symbol?

You are seeing the line break character displayed because "Show Formulas" mode is on or you have formatting marks visible. Press Ctrl+` (grave accent) to toggle formula view, or click the pilcrow button (¶) in the Home tab to hide formatting marks. The line break will display normally once these are turned off.

Can I use line breaks in a cell that is part of a formula?

Yes. A cell containing a line break can be referenced in a formula just like any other cell. The formula sees the entire cell content as one value. If you need to extract just the first or second line, you can use a combination of FIND and MID functions to locate the line break character and split the text.

Do line breaks work the same way in all versions of Excel?

Alt+Enter works in Excel for Windows, Mac, and the web version, though the Mac shortcut is Control+Option+Enter instead. The behavior is consistent across versions — line breaks stay in place and row height adjusts automatically.

What if I accidentally press Alt+Enter and need to undo it?

Press Ctrl+Z (Windows) or Command+Z (Mac) when ready to undo the line break. If you have already moved to another cell, click back on the cell with the unwanted break, press F2 to edit, find the break, and delete it manually.