Excel TEXTJOIN function: join a list with commas
TEXTJOIN joins a range with a separator you choose. =TEXTJOIN(", ",TRUE,A2:A7) returns "Dana, Luis, Priya, Marcus, Jen, Omar". The TRUE tells it to skip blank cells.
The examples use the same sales table as the practice box below.
| A Rep | B Sales | E Region | H Hired | |
|---|---|---|---|---|
| 2 | Dana | 1,250 | East | 3/12/2018 |
| 3 | Luis | 830 | West | 7/1/2021 |
| 4 | Priya | 2,100 | East | 11/20/2016 |
| 5 | Marcus | 475 | North | 2/15/2023 |
| 6 | Jen | 990 | West | 9/3/2019 |
| 7 | Omar | 1,600 | East | 1/27/2020 |
Syntax
=TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)
- delimiter: what goes between items, like
", "or" / ". - ignore_empty: TRUE to skip blank cells, FALSE to keep them.
- text1, text2: cells or ranges to join.
Examples
=TEXTJOIN(", ",TRUE,A2:A7)returns Dana, Luis, Priya, Marcus, Jen, Omar.=TEXTJOIN("-",TRUE,A2,E2)returns Dana-East.
Why not just use &?
With &, joining six names takes a long formula with a comma typed between each one. TEXTJOIN takes the whole range at once and doesn't leave a stray comma at the end.
Join only some rows
In Microsoft 365 and Google Sheets, combine it with FILTER: =TEXTJOIN(", ",TRUE,FILTER(A2:A7,E2:E7="East")) returns "Dana, Priya, Omar".
Which versions have it
Excel 2019 and later, Microsoft 365, Excel for the web and Google Sheets. Excel 2016 doesn't have TEXTJOIN.
Try it: Join the first three names
In C2, list the first three reps (A2 to A4) separated by a comma and a space.
Graded live, like a real Excel test. Press New numbers to prove you didn't memorize the answer. More practice
Questions people ask
Does Google Sheets have TEXTJOIN?
Yes, with the same syntax.
Can TEXTJOIN use a line break as the separator?
Yes. Use CHAR(10) as the delimiter and turn on Wrap Text.
Practice on a real spreadsheet
CellReady grades your formula the moment you press Enter and tells you why a wrong answer is wrong. The first 7 lessons are free, with no sign-up to start.
Related guides
How to combine text in Excel with the & operator, CONCAT and CONCATENATE, how to add spaces and dashes, and a live exercise building a code.
Fix extra spaces and random capitals in Excel with TRIM, PROPER, UPPER and LOWER, plus the cases they miss and a live exercise.
How to extract characters from text in Excel with LEFT, RIGHT and MID, how to split first and last names with FIND, and a live exercise.