What is the TEXTJOIN function?
=TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)TEXTJOIN joins text from several cells and puts a delimiter such as a comma or space between them. Use it to list items in one cell, like "Sales, Dev, HR".
With ignore_empty TRUE, blank cells are skipped; with FALSE, they get a delimiter too, giving ", ,". C3 above is blank, so switch between the two and compare the result row.
Arguments
- delimiter
- The characters to put between texts. "" (empty text) just joins them.
- ignore_empty
- TRUE skips blank cells. FALSE treats a blank cell as a value and adds a delimiter.
- text1, ...
- The text, cells or ranges to join.
TEXTJOIN examples
Example 1. A list of departments
=TEXTJOIN(", ", TRUE, C2:C5)Skips the blank C3: "Sales, Dev, HR".
Example 2. Keep a place for blanks
=TEXTJOIN(", ", FALSE, C2:C5)"Sales, , Dev, HR".
Example 3. Name and department with spaces
=TEXTJOIN(" ", TRUE, A2:C2)"Smith Liam Sales".
Common mistakes
Leaving out ignore_empty
ignore_empty is required. Always put TRUE or FALSE after the delimiter.
#NAME? in older versions
According to Microsoft, TEXTJOIN is available in Office 2019 and later and Microsoft 365.
FAQ
- How is it different from CONCAT?
- CONCAT has no delimiter or ignore_empty arguments.
- What if the delimiter is empty?
- It joins like CONCAT, but the ignore_empty setting still applies.