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.
TEXTJOIN accepts arrays in Google Sheets, so you can feed it the result of FILTER, UNIQUE or ARRAYFORMULA directly.
TEXTJOIN(delimiter, ignore_empty, text1, …)That makes it a short way to build a comma-separated list from a conditional selection.
For a fuller explanation of the arguments and common errors, see the TEXTJOIN Excel guide.
| 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 |
Google Sheets is used here only as a descriptive product name. FormulaCamp is not affiliated with Google.
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