Home › Excel basics › Wrap text & line breaks

Wrap Text in Excel and Add Line Breaks

To wrap text in Excel, select the cells and click Home › Wrap Text. Long text then continues on the next line inside the cell instead of running over into the next column. To start a new line exactly where you want, press Alt+Enter while typing.

In this guide
  1. Wrap text
  2. Line break in a cell
  3. Row height doesn't fit
  4. Line break in a formula
  5. Remove line breaks
  6. Alternatives
  7. FAQ

Wrap text automatically

  1. Select the cells, a column or the whole sheet.
  2. Click Home › Wrap Text. Keyboard: Alt, H, W.

Excel breaks the text at the column width and makes the row taller. Make the column wider or narrower and the lines adjust. Click Wrap Text again to switch it off.

Add a line break inside a cell

Double-click the cell (or press F2), put the cursor where the new line should start and press:

WindowsMac
Alt+EnterControl+Option+Return (or Option+Return / Cmd+Option+Return, depending on version)

Excel turns on Wrap Text for that cell automatically. Handy for addresses, notes and headers like "Revenue (EUR)" on two lines.

Row height doesn't adjust

If text is cut off after wrapping, the row has a fixed height. Select the rows and double-click the border below a row number, or use Home › Format › AutoFit Row Height.

AutoFit doesn't work on merged cells: there you have to drag the row height by hand. One more reason to avoid merging.

Line break in a formula: CHAR(10)

In a formula, CHAR(10) is a line break. To combine a name and an address over two lines:

=A2 & CHAR(10) & B2

Turn on Wrap Text for the result cell, otherwise the break is invisible. In Excel 365 you can join a whole range with breaks:

=TEXTJOIN(CHAR(10), TRUE, A2:A5)

On a Mac, older Excel versions use CHAR(13). More ways to join text: CONCATENATE and TEXTJOIN.

Remove line breaks

With a formula, replacing each break by a space:

=SUBSTITUTE(A2, CHAR(10), " ")

Or in place with Find & Replace:

  1. Select the cells and press Ctrl+H.
  2. Click in "Find what" and press Ctrl+J. You won't see anything, except maybe a blinking dot: that's the line break.
  3. Type a space in "Replace with" and click Replace All.

Also useful for Text to Columns: choose Other as delimiter and press Ctrl+J to split lines into columns.

Alternatives to wrapping

  • Shrink to Fit (Ctrl+1 › Alignment) makes the text smaller to fit on one line.
  • Rotate text (Home › Orientation) for narrow columns with long headers.
  • Wider columns: double-click the right edge of the column header to fit the longest value.

Frequently asked questions

Why does Alt+Enter not work?

You need to be editing the cell (double-click or F2). On some laptops, use the left Alt key; on a Mac use Control+Option+Return.

Why don't I see the line break from my formula?

Wrap Text is off for that cell. CHAR(10) only shows as a new line when the cell wraps.

How do I wrap text in Excel without changing the row height?

Set the row height first (right-click the row number › Row Height). Wrapped text then stays within that height and the rest is hidden.

How do I count the lines in a cell?

=LEN(A2)-LEN(SUBSTITUTE(A2, CHAR(10), ""))+1 counts the line breaks plus one. See LEN.