TEXTJOIN
Joins text values using a delimiter, with optional empty-value filtering.
TEXTJOIN(delimiter, ignore_empty, text1, ...) is useful for building labels and lists.
The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.
Syntax
=TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
delimiter | any | Required | — |
ignore_empty | any | Required | — |
text1 | any (range) | Required | — |
text2 | value | Optional | — |
Accepts a variable number of arguments. Minimum: 3.
Return type
Can return text.
Remarks
ignore_empty=TRUEskips empty strings and empty cells.ignore_empty=FALSEincludes empty items, which can produce adjacent delimiters.- Text ranges and arrays are flattened in row-major order.
- Delimiter and values are coerced to text.
- Any error in inputs propagates immediately.
Error cases
- Results longer than 32,767 characters return
#VALUE!.
Examples
Join text while skipping empty items.
Formula =TEXTJOIN(", ",TRUE,"East","","West")
Expected result East, West
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Keep the empty item so it contributes a separator position.
Formula =TEXTJOIN(", ",FALSE,"East","","West")
Expected result East, , West
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
A single nonempty item needs no delimiter.
Formula =TEXTJOIN(", ",TRUE,"East")
Expected result East
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
A division-by-zero error among the inputs propagates.
Formula =TEXTJOIN(", ",TRUE,"East",1/0)
Expected result #DIV/0!
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Ignore empty entries
Formula =TEXTJOIN(",", TRUE, "a", "", "c")
Expected result a,c
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Keep empty entries
Formula =TEXTJOIN("-", FALSE, "a", "", "c")
Expected result a--c
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Related functions
FAQ
What does ignore_empty change?
TRUE skips empty values; FALSE keeps them, which can create adjacent delimiters.