TEXTJOIN Function

Excel Functions › Text

Excel 2019+ Excel 365

The Excel TEXTJOIN function glues a whole range of values into one string, putting a delimiter of your choice between every piece — and it can skip blank cells automatically, which neither CONCAT nor the & operator can do. One formula turns a column of names into Ana, Ben, Carla. Its opposite number is TEXTSPLIT, which takes a joined string back apart.


Quick answer: to join everything in A2:A20 with a comma and a space, skipping blanks:
=TEXTJOIN(", ", TRUE, A2:A20)
The first argument is the delimiter, the second says whether to ignore empty cells (TRUE almost always), and everything after that is what to join.

Syntax

=TEXTJOIN(delimiter, ignore_empty, text1, [text2], …)
ArgumentDescription
delimiterRequiredThe text to put between each value — ", ", " - ", even "" for nothing at all. Can also be a range of delimiters used in turn.
ignore_emptyRequiredTRUE skips empty cells; FALSE keeps them, producing doubled delimiters where blanks sit.
text1RequiredThe first value, cell, or range to join.
text2, …OptionalUp to 252 more values or ranges.

Available in: Excel 2019 and later, Excel for Microsoft 365, and Excel for the web. Excel 2016 perpetual and older show #NAME?. The result is one single text value — nothing spills.

Join a range into one cell

Attendee names sit in A2:A6 with one blank row. One formula builds the invite line and quietly steps over the gap:

AC
1AttendeeOne line for the invite
2AnaAna, Ben, Carla, Dev
3Ben
4Carla
5
6Dev
=TEXTJOIN(", ", TRUE, A2:A6) // blank A5 is skipped

Flip ignore_empty to FALSE and the blank shows up as a doubled delimiter — Ana, Ben, Carla, , Dev — which is almost never what you want.

The delimiter can be any text, including nothing:

=TEXTJOIN("", TRUE, B2, C2, D2) // join with no separator, like CONCAT
=TEXTJOIN(" | ", TRUE, A2:A6) // pipe-separated, padded with spaces

Try it: interactive TEXTJOIN demo

Live demo

Five cells, one of them empty. Pick a delimiter and toggle ignore_empty to see how the blank is handled.

Conditional joins and power moves

TEXTJOIN’s killer combo is with FILTER or IF — a comma-separated list of only the rows that match a condition. This is the classic “lookup that returns multiple results in one cell”:

=TEXTJOIN(", ", TRUE, FILTER(A2:A50, B2:B50="West")) // every name in the West region, one cell
=TEXTJOIN(", ", TRUE, IF(B2:B50="West", A2:A50, "")) // same idea for Excel 2019, entered with Ctrl+Shift+Enter

Joining with a line break makes multi-line labels and addresses — turn on Wrap Text in the cell:

=TEXTJOIN(CHAR(10), TRUE, A2, A3, A4) // CHAR(10) is a line break

And a round trip with TEXTSPLIT rewrites delimiters in one move:

=TEXTJOIN(" | ", TRUE, TEXTSPLIT(A2, ",")) // commas become pipes (365 only)

Errors & common pitfalls

#NAME? — your Excel is too old. TEXTJOIN arrived in Excel 2019. In Excel 2016 perpetual and earlier the name isn’t recognized — fall back on CONCATENATE or chains of &.

#VALUE! — the result is too long. A cell holds at most 32,767 characters. Join a big enough range and TEXTJOIN overflows that limit and errors out.

Pitfall: skipping ignore_empty. It is a required argument — =TEXTJOIN(", ", A2:A6) doesn’t mean what it looks like; Excel reads A2:A6 as text1’s predecessor and complains. Always supply TRUE or FALSE second.

Pitfall: a space is not “empty.” ignore_empty skips truly blank cells and "" results, but a cell holding a single space counts as content — it sneaks into the join and produces stray doubled delimiters. TRIM the source data first.

Pitfall: dates turn into serial numbers. TEXTJOIN reads the underlying value, so 6/11/2026 joins as 46184. Wrap dates in TEXT first: TEXT(A2, "m/d/yyyy").

Practice workbook

📊
Download the free TEXTJOIN practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

What's the difference between TEXTJOIN, CONCAT, and CONCATENATE?
All three glue text together. CONCAT joins ranges but offers no delimiter and keeps blanks; CONCATENATE is the legacy version that can’t even take ranges. TEXTJOIN does both jobs better: a delimiter between every piece and optional blank-skipping.
How do I join only the cells that meet a condition?
Wrap FILTER inside TEXTJOIN: =TEXTJOIN(", ", TRUE, FILTER(A2:A50, B2:B50="West")). In Excel 2019 (no FILTER), use =TEXTJOIN(", ", TRUE, IF(B2:B50="West", A2:A50, "")) confirmed with Ctrl+Shift+Enter.
How do I join cells with a line break between them?
Use CHAR(10) as the delimiter: =TEXTJOIN(CHAR(10), TRUE, A2:A5) — then turn on Wrap Text for the result cell or the breaks stay invisible.
Why do my joined dates show up as numbers like 46184?
TEXTJOIN joins the stored value, and Excel stores dates as serial numbers. Format each date as text first: =TEXTJOIN(", ", TRUE, TEXT(A2,"m/d/yyyy"), TEXT(A3,"m/d/yyyy")).
Which Excel versions have TEXTJOIN?
Excel 2019 and newer, Excel for Microsoft 365, and Excel for the web. Excel 2016 perpetual and earlier don't have it and show #NAME? instead.
Is there a way to reverse TEXTJOIN?
Yes — TEXTSPLIT (Excel 365) splits the joined string back into pieces at the same delimiter.

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: TEXTSPLIT · CONCAT · CONCATENATE · FILTER · TEXTBEFORE