TEXTJOIN combines text from several cells or ranges into one string, with a delimiter between the pieces and an option to skip empty cells. It replaces long chains of & and CONCATENATE, and it is the clean way to build lists such as "Ana, Ben, Chloe" from a column.
Syntax
=TEXTJOIN(delimiter, ignore_empty, text1, [text2, ...])
delimiter: The text placed between pieces, such as", "," ","-"orCHAR(10)for a line break. Use""for no separator.ignore_empty:TRUEskips empty cells so you do not get doubled delimiters.FALSEkeeps them.text1, text2, ...: Values, cell references or whole ranges to join.
Basic examples
=TEXTJOIN(", ", TRUE, A2:A6)
If A2:A6 contains Ana, Ben, `` (empty), Chloe, Dev, the result is Ana, Ben, Chloe, Dev. Setting ignore_empty to FALSE would produce Ana, Ben, , Chloe, Dev.
=TEXTJOIN(" ", TRUE, A2, B2, C2)
Joins a first name, middle name and last name, skipping the middle name when it is blank, so you do not end up with a double space.
=TEXTJOIN("-", TRUE, "2026", "03", "15")
Returns 2026-03-15.
Joining with line breaks
=TEXTJOIN(CHAR(10), TRUE, A2:A6)
Puts each item on its own line within the cell. Turn on Format > Wrap text to see the lines.
Practical patterns
Join only the items that meet a condition
Combine with FILTER:
=TEXTJOIN(", ", TRUE, FILTER(A2:A100, B2:B100 = "Sales"))
This produces one cell with the names of everyone in Sales.
Join unique values
=TEXTJOIN(", ", TRUE, UNIQUE(A2:A100))
Join with a condition, without FILTER
=TEXTJOIN(", ", TRUE, IF(B2:B100 = "Sales", A2:A100, ""))
In Sheets, wrap this in ARRAYFORMULA if it doesn't evaluate as an array:
=ARRAYFORMULA(TEXTJOIN(", ", TRUE, IF(B2:B100 = "Sales", A2:A100, "")))
Build an address line
=TEXTJOIN(", ", TRUE, A2, B2, C2, D2)
Street, city, state and ZIP, skipping any that are empty.
Join a row
=TEXTJOIN(" | ", TRUE, A2:E2)
Create an email list
=TEXTJOIN("; ", TRUE, B2:B50)
Paste the result straight into an email's address field.
Build a regex or QUERY condition
=TEXTJOIN("|", TRUE, F2:F10)
Joins keywords into a|b|c for use in REGEXMATCH.
=TEXTJOIN(" or ", TRUE, ARRAYFORMULA("A='" & F2:F10 & "'"))
Builds a QUERY where clause from a list.
Join for each row
To apply it to every row, use ARRAYFORMULA over ranges that are arrays, such as =ARRAYFORMULA(A2:A & " " & B2:B). TEXTJOIN merges everything into one cell, so for per-row joins, use & or CONCATENATE.
Video Example
Numbers and dates
TEXTJOIN converts numbers and dates to text using their underlying values. A date joins as a serial number such as 46096. Format it first:
=TEXTJOIN(", ", TRUE, ARRAYFORMULA(TEXT(A2:A6, "dd mmm yyyy")))
Likewise, format currency and percentages with TEXT before joining.
Common errors
- An error about the result being too long. A cell holds at most 50,000 characters. Join fewer items.
- A date appears as a number. Wrap with
TEXT(..., "format"). - Doubled delimiters.
ignore_emptyisFALSE, or cells contain""from formulas. A cell holding an empty string from a formula can be treated as empty only whenignore_emptyisTRUE. - Only one cell result when you wanted several.
TEXTJOINalways returns one string. For one result per row, use&. - Wrong delimiter order. The delimiter and
ignore_emptycome first, and the values follow.
TEXTJOIN vs. CONCATENATE vs. the & operator
TEXTJOINaccepts ranges, adds a delimiter, and can skip blanks. It is the best choice for joining more than two or three items.CONCATENATEjoins individual items with no delimiter.&is the shortest for two or three pieces:=A2 & " " & B2.
Frequently asked questions
Can TEXTJOIN take a whole column? Yes, TEXTJOIN(", ", TRUE, A:A) joins all non-empty cells, but a bounded range such as A2:A100 is faster.
What is the opposite of TEXTJOIN? SPLIT.
Can I use more than one range? Yes: TEXTJOIN(", ", TRUE, A2:A10, C2:C10).
What is the length limit? A cell can hold up to 50,000 characters.
Related Functions
CONCATENATE: Join text with no delimiter.SPLIT: Divide text at a delimiter.FILTER: Return only the rows that meet a condition.UNIQUE: Return distinct values.TEXT: Format a number or date as text.