=TEXTJOIN(", ",TRUE,A2:A6) joins every cell in A2:A6 into one text, with a comma and a space between the items. The first argument is the delimiter, the second says whether to skip empty cells, and everything after it is the text to join.
| A | B | C | |
|---|---|---|---|
| 1 | Team | Members | |
| 2 | Ana | Ana, Ben, Chen, Dara, Eli | |
| 3 | Ben | ||
| 4 | Chen | ||
| 5 | Dara | ||
| 6 | Eli |
Clear one of the names in column A: C2 updates and never leaves a double comma. TEXTJOIN needs Excel 2019 or later (including Microsoft 365); in Excel 2016 it shows #NAME?.
TEXTJOIN syntax
=TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)
delimiter: the text placed between items, in quotes.", ","; "," | ","-"or""for nothing.ignore_empty:TRUEskips empty cells,FALSEkeeps them, so two delimiters sit side by side.text1, text2, ...: cells, ranges, or text in quotes. Up to 252 of them, and ranges can be rows, columns or blocks.
Skip blank cells with ignore_empty
| A | B | C | |
|---|---|---|---|
| 1 | Size | Result | |
| 2 | S | S, M, L, XL | |
| 3 | S, , M, L, , XL | ||
| 4 | M | ||
| 5 | L | ||
| 6 | |||
| 7 | XL |
C2 gives S, M, L, XL. C3 keeps the two empty cells and shows the gaps as , ,. Use FALSE only when the position of each item matters, for example when the list is read back by another tool.
The same idea fixes full names with an optional middle name. =A2&" "&B2&" "&C2 leaves two spaces when B2 is empty; TEXTJOIN with a space as the delimiter and TRUE does not:
| A | B | C | D | |
|---|---|---|---|---|
| 1 | First | Middle | Last | Full name |
| 2 | Ana | Maria | Silva | Ana Maria Silva |
| 3 | Ben | Okafor | Ben Okafor | |
| 4 | Chen | Li | Wu | Chen Li Wu |
| A | B | C | |
|---|---|---|---|
| 1 | Order | List | |
| 2 | 1041 | ||
| 3 | 1042 | ||
| 4 | |||
| 5 | 1045 | ||
| 6 | 1046 | ||
| 7 |
Your turn: In C2, join the order numbers in A2:A7 into one cell, separated by a comma and a space, without gaps for the empty cells.
TEXTJOIN with a condition
To join only the rows that match, put FILTER inside TEXTJOIN. FILTER returns the matching names and TEXTJOIN joins them:
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Name | Region | Region | Names | |
| 2 | Ana | North | North | Ana, Chen, Eli | |
| 3 | Ben | South | Ana, Chen, Eli | ||
| 4 | Chen | North | Regions | North, South, East | |
| 5 | Dara | East | |||
| 6 | Eli | North | |||
| 7 | Fay | South |
Change D2 to South and both formulas list Ben and Fay. E2 uses FILTER, which needs Excel 2021 or Microsoft 365. E3 is the version for Excel 2019: IF returns the name where the region matches and empty text elsewhere, and TRUE drops the empty texts. In Excel 2019 confirm E3 with Ctrl+Shift+Enter (Cmd+Shift+Enter on a Mac).
Two more combinations people often need:
- Unique values only:
=TEXTJOIN(", ",TRUE,UNIQUE(B2:B7)), in E4, givesNorth, South, East. - Sorted:
=TEXTJOIN(", ",TRUE,SORT(FILTER(A2:A7,B2:B7=D2))).
If nothing matches, FILTER returns #CALC! and so does TEXTJOIN. Give FILTER a third argument for that case: FILTER(A2:A7,B2:B7=D2,"none").
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Name | Region | East team | ||
| 2 | Ana | North | |||
| 3 | Ben | South | |||
| 4 | Chen | East | |||
| 5 | Dara | East | |||
| 6 | Eli | North | |||
| 7 | Fay | South |
Your turn: In E2, list the names whose region is East, separated by a comma and a space.
Join dates and numbers with their format
TEXTJOIN joins the stored value, not what the cell shows. A date joins as its serial number (2026-03-02 is 46083) and a percentage as a decimal. Convert the range with TEXT inside TEXTJOIN:
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Meeting | Date | Dates | |
| 2 | Kickoff | 2026-03-02 | 46083, 46097, 46113 | |
| 3 | Review | 2026-03-16 | Mar 2, Mar 16, Apr 1 | |
| 4 | Launch | 2026-04-01 |
TEXTJOIN vs CONCAT and &
| TEXTJOIN | CONCAT | & | |
|---|---|---|---|
| Joins a range | Yes | Yes | No, one cell at a time |
| Puts a delimiter between items | Yes, once for all | No | You type it each time |
| Skips empty cells | Yes, with TRUE | No | No |
| Oldest version | Excel 2019 | Excel 2019 | Every version |
For two or three cells & is the quickest; see concatenate. For a list of any length, TEXTJOIN. One limit to know: a cell holds at most 32,767 characters, and TEXTJOIN returns #VALUE! when the joined text is longer.
Frequently Asked Questions
What does TEXTJOIN do in Excel?
It joins text from cells or ranges and puts a delimiter between the items: =TEXTJOIN(", ",TRUE,A2:A6) turns five cells into one comma-separated list. The second argument, TRUE, skips empty cells.
How do I use TEXTJOIN with a condition?
Give it a FILTER: =TEXTJOIN(", ",TRUE,FILTER(A2:A7,B2:B7="North")) joins only the names whose region is North. In Excel 2019, which has no FILTER, use =TEXTJOIN(", ",TRUE,IF(B2:B7="North",A2:A7,"")) confirmed with Ctrl+Shift+Enter.
Which Excel versions have TEXTJOIN?
Excel 2019, Excel 2021 and Microsoft 365, plus Excel for the web. In Excel 2016 and older it shows #NAME?; join with & there. Google Sheets also has TEXTJOIN.
Why does TEXTJOIN show numbers instead of dates?
TEXTJOIN joins the stored value, and a date is stored as a serial number. Convert the dates first: =TEXTJOIN(", ",TRUE,TEXT(B2:B4,"mmm d")).