Google Sheets function · Text
TEXTJOIN in Google Sheets: syntax and examples
TEXTJOIN glues texts and ranges into one string, with a delimiter between the pieces. Unlike CONCATENATE, it takes whole ranges and can leave empty cells out.
Syntax
TEXTJOIN(delimiter, ignore_empty, text1, [text2], …)
Arguments
| Argument | Type | Required | What it does |
|---|---|---|---|
delimiter | text | yes | The text placed between the pieces, such as ", " or " - ". It can be empty. |
ignore_empty | boolean | yes | TRUE skips empty cells. FALSE keeps them, which leaves doubled delimiters. |
text1 | any | yes | The first text, cell or range to join. Ranges are read row by row. |
text2 | any | no | More texts, cells or ranges to append. |
Examples
The examples use this table, starting in A1:
| Item | Color | Size | Note |
| Lamp | black | LED | |
| Chair | grey | L | |
| Stand | silver | M | Alu |
=TEXTJOIN(", ", TRUE, A2:D2)Result: Lamp, black, LED
Joins a whole row. The empty size cell is skipped, so there is no double comma.
Run in a Google Sheet (English US locale) on .
=TEXTJOIN(", ", FALSE, A2:D2)Result: Lamp, black, , LED
The same row with ignore_empty set to FALSE: the empty cell leaves a gap between two delimiters.
Run in a Google Sheet (English US locale) on .
=TEXTJOIN(" - ", TRUE, A2, B2)Result: Lamp - black
Two single cells with a custom delimiter.
Run in a Google Sheet (English US locale) on .
=TEXTJOIN(", ", TRUE, A2:A4)Result: Lamp, Chair, Stand
A column of items turned into one comma list.
Run in a Google Sheet (English US locale) on .
=TEXTJOIN(", ", TRUE, ARRAYFORMULA(UPPER(A2:A4)))Result: LAMP, CHAIR, STAND
A function applied to every cell first, then joined. ARRAYFORMULA makes UPPER work on the whole range.
Run in a Google Sheet (English US locale) on .
Common errors
- The second argument is required. Writing only a delimiter and a range returns #N/A.
- ignore_empty must be TRUE or FALSE. A text such as "yes" returns #VALUE!.
- With FALSE, every empty cell still adds a delimiter, so you get "Lamp, black, , LED". Use TRUE for clean lists.
- A range is read row by row, left to right. For a column the order is top to bottom.
Compared with Excel
Same syntax as Excel TEXTJOIN. Excel 2019 and later have it, older versions do not.