Comma-separated list
| A | |
|---|---|
| 1 | Name |
| 2 | Ana |
| 3 | |
| 4 | Cara |
| 5 | Dan |
Formula: C1: =TEXTJOIN(", ",TRUE,A2:A5)
Result: Ana, Cara, Dan
TRUE skips the empty cell A3, so there are no doubled commas.
Joins a list with a delimiter.
TEXTJOIN(delimiter, ignore_empty, text1, …)Example: =TEXTJOIN(", ",TRUE,A2:A10)
Available in: Excel 2019+
TEXTJOIN combines the text from several cells or ranges with a delimiter between them: =TEXTJOIN(delimiter, ignore_empty, text1, …). It can skip blanks, which makes it better than CONCAT, CONCATENATE or & for building lists.
| A | |
|---|---|
| 1 | Name |
| 2 | Ana |
| 3 | |
| 4 | Cara |
| 5 | Dan |
Formula: C1: =TEXTJOIN(", ",TRUE,A2:A5)
Result: Ana, Cara, Dan
TRUE skips the empty cell A3, so there are no doubled commas.
| A | B | |
|---|---|---|
| 1 | First | Last |
| 2 | Maria | Lopez |
Formula: D2: =TEXTJOIN(" ",TRUE,A2,B2)
Result: Maria Lopez
A single space is the delimiter.
| A | B | C | |
|---|---|---|---|
| 1 | Region | Product | Year |
| 2 | EU | Pen | 2024 |
Formula: E2: =TEXTJOIN("-",TRUE,A2:C2)
Result: EU-Pen-2024
Joins a row range with hyphens. A number such as 2024 is joined as is; use TEXT for leading zeros.
A tiny spreadsheet with example data. Edit the formula or any number and see the result.
Formula in D2: =TEXTJOIN(", ",TRUE,A2:A5)
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Text | Other | Result | |
| 2 | Alice Johnson | alice johnson | Alice Johnson, [email protected], extra spaces , SKU-2026-0415 | |
| 3 | [email protected] | [email protected] | ||
| 4 | extra spaces | |||
| 5 | SKU-2026-0415 | |||
| 6 | iced coffee, tea, sugar | |||
| 7 | Order 417 shipped |
Enter — commit · F2 — edit · F4 — $ in a reference · Ctrl+C/Ctrl+V — copy and paste · Ctrl+Z — undo
Esc or F6 — leave the sheet for the «Check» button · Shift+Tab in the first cell — back to the page