Cellwise Try it free

Excel guide · 3 min read

Combine cells with a line break in Excel

Quick answerJoin the cells with CHAR(10), Excel's line break character: =A2&CHAR(10)&B2&CHAR(10)&C2. Then turn on Home > Wrap Text for that cell, or the breaks will not show. In Excel 2019 and 365, =TEXTJOIN(CHAR(10),TRUE,A2:D2) does the same and skips empty cells.

Sample data

Every result on this page was calculated from this sheet by the same spreadsheet engine the Cellwise app uses.

ABCD
1NameStreetCityPostcode
2Grace Mbeki14 Alder RoadLeedsLS6 2DF
3Tomás FerreiraFlat 3, 88 Canal StreetManchesterM1 3HE
4Ines Moreau2 Harbour ViewTR19 6AA
5Owen Price51 Station LaneCardiffCF10 1EP

Join cells with CHAR(10)

CHAR(10) is the line feed character, the same thing Excel inserts when you press Alt+Enter while typing. Put it between the parts with &, exactly where you would put a space or comma.

For the first customer, =A2&CHAR(10)&B2&CHAR(10)&C2&" "&D2 builds a three-line mailing label: the name, the street, then the city and postcode on one line. Fill it down the column for the rest.

Make the line breaks show: Wrap Text

Right after you enter the formula, the result looks like one long line. The breaks are there; Excel just is not wrapping the cell. Typing Alt+Enter turns Wrap Text on for you, but a formula does not.

  1. Select the formula cells.
  2. Click Home > Wrap Text.
  3. If the rows do not grow, select them and double-click a row border to AutoFit the height. Rows you resized by hand keep their fixed height until you do this.

Skip empty cells with TEXTJOIN (Excel 2019 / 365)

Ines has no city, so the & version leaves an empty line in her label. TEXTJOIN takes the separator once and a TRUE that tells it to ignore blank cells, so there are no doubled breaks.

=TEXTJOIN(CHAR(10),TRUE,A4:D4) puts each part on its own line and simply skips C4. It also takes a whole range, which is much shorter than chaining & for six or seven columns.

Use the & version only if the file must open in Excel 2016 or earlier, which do not have TEXTJOIN. There, wrap each optional part in IF: IF(C4="","",CHAR(10)&C4).

Type a line break by hand

To break a line while typing in a cell, press Alt+Enter where you want the new line. On a Mac, press Control+Option+Return. This is fine for a note or a header like "Units" on one line and "(boxes)" on the next. For many rows, use a formula so the result updates when the data changes.

Split or remove line breaks later

Data pasted from a web form often comes with line breaks inside cells. To split it into columns, use Data > Text to Columns, choose Delimited, tick Other and press Ctrl+J in the box (the box looks empty, but it now holds a line break). In Excel 365, =TEXTSPLIT(A2,CHAR(10)) spills the lines across columns and =TEXTSPLIT(A2,,CHAR(10)) spills them down rows.

To remove breaks, =SUBSTITUTE(A2,CHAR(10),", ") swaps each one for a comma and space. CLEAN(A2) also deletes them, but it glues the lines together with no space between, so "14 Alder Road" and "Leeds" on separate lines become "14 Alder RoadLeeds". To fix a whole column in place, press Ctrl+H, press Ctrl+J in the Find what box, type ", " in Replace with and click Replace All.

Text from some systems uses a carriage return plus line feed, CHAR(13)&CHAR(10). If a stray symbol or gap remains after removing CHAR(10), remove CHAR(13) as well.

Common mistakes

The formula shows everything on one line

Turn on Home > Wrap Text for the cells. CHAR(10) only breaks the line in a wrapped cell.

Blank lines in the result

An empty cell still gets its CHAR(10). Use TEXTJOIN with TRUE as the second argument, or wrap optional parts in IF.

Using CHAR(13) for a new line

In current Windows and Mac Excel the in-cell line break is CHAR(10). Very old Mac versions used CHAR(13).

Line breaks break your CSV import elsewhere

Excel saves cells with breaks inside quotes, which some systems mishandle. Replace CHAR(10) with a comma or space before exporting.

FAQ

How do I add a line break in an Excel formula?

Join CHAR(10) where the break should go, such as =A2&CHAR(10)&B2, and turn on Wrap Text for the cell.

Why is CHAR(10) not working in Excel?

It almost always is working, but Wrap Text is off. Select the cell and click Home > Wrap Text, then AutoFit the row height.

How do I combine cells with a line break and skip blanks?

=TEXTJOIN(CHAR(10),TRUE,A2:D2) in Excel 2019 or 365. The TRUE ignores empty cells, so no blank lines appear.

How do I remove line breaks in Excel?

=SUBSTITUTE(A2,CHAR(10)," ") in a formula, or Ctrl+H with Ctrl+J in Find what and a space in Replace with.

Functions used

Related guides

Updated