Analistable

How to combine text from multiple cells in Excel

By the Analistable team · Updated · 2 min read

Use =A2&" "&B2 to join two cells with a space, or =TEXTJOIN(", ", TRUE, A2:D2) to join a whole range with a separator and skip empty cells. Add line breaks with CHAR(10) (and turn on Wrap Text), keep number formats with TEXT(), and join only matching values with TEXTJOIN + FILTER.

Part of our guide: How to merge cells, columns and text in Excel

The building blocks

Text-combining functions
FunctionUse it forExample
&Two or three cells, any version=A2&" "&B2
CONCATENATELegacy files=CONCATENATE(A2, " ", B2)
CONCATA range with no separator=CONCAT(A2:D2)
TEXTJOINA range with a separator, skipping blanks=TEXTJOIN(", ", TRUE, A2:D2)

Skip empty cells

With &, empty cells leave double separators: “12 Main St, , Leeds”. TEXTJOIN's second argument TRUE skips them:

=TEXTJOIN(", ", TRUE, A2:D2)
Address parts joined with TEXTJOIN
StreetLine 2CityPostcodeResult
12 Main StLeedsLS1 4AP12 Main St, Leeds, LS1 4AP
4 Quay RdUnit 7HullHU1 2AB4 Quay Rd, Unit 7, Hull, HU1 2AB

Line breaks

=TEXTJOIN(CHAR(10), TRUE, A2:D2) puts each part on its own line inside the cell. Turn on Home → Wrap Text to see them. (On a Mac, CHAR(10) also works in current Excel versions.)

Numbers, dates and percentages

Joined numbers lose their formatting. Format them with TEXT:

="Total: "&TEXT(B2, "#,##0.00")&" ("&TEXT(C2, "0%")&") on "&TEXT(D2, "d mmm yyyy")

Join only some values

Combine with FILTER to join values that meet a condition — for example every product a customer bought:

=TEXTJOIN(", ", TRUE, FILTER(Orders[Product], Orders[Customer]=A2, ""))

More on this pattern in returning every match with TEXTJOIN.

To combine whole columns and keep the result, see combining two columns in Excel. In Google Sheets, see CONCATENATE and TEXTJOIN in Google Sheets.

Combine text across rows

TEXTJOIN works on columns too: =TEXTJOIN(", ", TRUE, A2:A20) turns a list of names into one line, and =TEXTJOIN(", ", TRUE, UNIQUE(A2:A20)) removes repeats first. To combine the text of rows into one cell with line breaks — an address split over several rows, for example — see merging rows without losing data.

Which function should you use?

Choosing a text-joining function
SituationUse
Two or three cells, file shared with older Excel versions&
A range with a separator, blanks possibleTEXTJOIN
A range with no separator at allCONCAT
Values that meet a conditionTEXTJOIN + FILTER
Need the result to stay after deleting sourcesAny of the above, then Paste Special → Values

Common mistakes

  • Forgetting the space: =A2&B2 gives “AdaLovelace”.
  • Quotes around cell references: ="A2"&B2 joins the text “A2”, not the cell's value.
  • Exceeding 32,767 characters in a cell: TEXTJOIN returns #VALUE!.

Frequently asked questions

How do I combine text from two cells in Excel?
Use =A2&" "&B2, or =TEXTJOIN(" ", TRUE, A2:B2) to skip blanks.
How do I combine text with a line break?
Use CHAR(10) as the separator, for example =A2&CHAR(10)&B2, and turn on Wrap Text.
What's the difference between CONCAT and TEXTJOIN?
CONCAT joins values with nothing in between. TEXTJOIN inserts a separator between values and can ignore empty cells.

Related guides