TEXTJOIN in Excel joins text with a delimiter
Join text with =TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...). If A2 is Apple, A3 is blank, and A4 is Pear, =TEXTJOIN(", ", TRUE, A2:A4) returns Apple, Pear.
=TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)The TEXTJOIN formula in Excel is =TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...). It joins text and inserts the delimiter you choose between each item. Put Apple in A2, leave A3 blank, and put Pear in A4. =TEXTJOIN(", ", TRUE, A2:A4) returns Apple, Pear. The same formula with FALSE returns Apple, , Pear. TRUE also skips a cell whose formula returns an empty text string. The delimiter can be quoted text or a cell reference, and a number used as a delimiter is turned into text. You can pass up to 252 text arguments. One range counts as a single argument. If the joined result is longer than 32,767 characters, TEXTJOIN returns #VALUE!. The function is in Excel 2019, Excel 2021, Excel 2024, Microsoft 365, and Excel for the web. Perpetual Excel 2016 returns #NAME?. French Excel names it JOINDRE.TEXTE and separates arguments with semicolons.
Syntax & Parameters
The syntax is =TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...). delimiter is required. It can be text in double quotes, an empty string "", or a cell that contains the separator. If you pass a number, Excel converts that number to text. ignore_empty is required: TRUE skips blank cells and cells that contain "". FALSE keeps them, so two delimiters appear in a row. text1 is required and can be text, a cell, or a range. text2 and the later arguments are optional. The limit is 252 text arguments, and a range such as A2:A4 counts as one argument. =TEXTJOIN(", ", TRUE, A2:A4) with Apple, a blank, and Pear returns Apple, Pear. =TEXTJOIN(", ", FALSE, A2:A4) returns Apple, , Pear. =TEXTJOIN(" ", TRUE, "The", "sun", "will", "come", "up", "tomorrow.") returns The sun will come up tomorrow. A joined result longer than 32,767 characters returns #VALUE!.
delimiterignore_emptytext1Practical Examples
Skip a blank cell
=TEXTJOIN(", ", TRUE, A2:A4)The delimiter is a comma followed by a space. TRUE drops the blank cell, so no extra comma is left in the result.
Keep the blank cell
=TEXTJOIN(", ", FALSE, A2:A4)FALSE keeps the empty cell. The delimiter is written before and after it, which leaves a comma with nothing between the two commas.
Join words with a space
=TEXTJOIN(" ", TRUE, "The", "sun", "will", "come", "up", "tomorrow.")The delimiter is a single space. TRUE has nothing to skip because every argument contains text.
Key Takeaways
- =TEXTJOIN(", ", TRUE, A2:A4) returns Apple, Pear when A3 is blank.
- FALSE keeps blanks, so the same cells return Apple, , Pear.
- TRUE also skips a formula that returns "".
- A result longer than 32,767 characters returns #VALUE!, and it is not cut off.
- Perpetual Excel 2016 returns #NAME?. French Excel uses JOINDRE.TEXTE.
Pro Tips
Store the delimiter in a cell and refer to it, for example =TEXTJOIN(D2, TRUE, A2:A4) when D2 contains ", ".
Impact : You can change the separator for every formula that points at D2 without editing each formula.
Pass a bounded range such as A2:A100, not a whole column.
Impact : TEXTJOIN then reads only the cells you intend, and the workbook recalculates less.
Wrap dates and numbers in TEXT when the display format matters.
Impact : TEXTJOIN converts a date serial to digits. TEXT(A2,"yyyy-mm-dd") keeps the date readable inside the joined text.
Useful Combinations
Keep only the values that pass a test
=TEXTJOIN(", ", TRUE, IF(B2:B4>10, A2:A4, ""))In Microsoft 365, IF returns the names in A2:A4 when the matching cell in B2:B4 is greater than 10, and "" otherwise. TRUE drops those empty results. If A2:A4 are North, South, East and B2:B4 are 12, 8, 15, the result is North, East.
Build a date from its parts
=TEXTJOIN("-", TRUE, TEXT(DATE(2026,11,2),"yyyy"), TEXT(DATE(2026,11,2),"mm"), TEXT(DATE(2026,11,2),"dd"))DATE(2026,11,2) is a serial number. TEXT turns each part into text before TEXTJOIN runs, so the pieces stay 2026, 11, and 02. The hyphen is the delimiter.
Put each item on its own line
=TEXTJOIN(CHAR(10), TRUE, A2:A4)CHAR(10) is a line break. With Apple, a blank, and Pear, TRUE returns Apple and Pear on two lines. Turn on Wrap Text for the cell. FALSE would leave a blank line where A3 is empty.
Common Errors
Cause: The joined text is longer than 32,767 characters, or ignore_empty is text such as "yes" instead of TRUE or FALSE.
Solution: Shorten the inputs so the result fits in one cell. Pass TRUE or FALSE as the second argument, not a word in quotes.
Cause: The workbook is open in perpetual Excel 2016 or earlier, the function name is misspelled, or TEXTJOIN is used in French Excel.
Solution: Use Excel 2019, Excel 2021, Excel 2024, or Microsoft 365. In French Excel, use JOINDRE.TEXTE and separate arguments with semicolons.
Cause: The delimiter is written without quotes, so Excel treats it as a name. =TEXTJOIN(, TRUE, A2:A4) is also missing the delimiter.
Solution: Put the delimiter in quotes, as in ", ", or point it at a cell that contains the separator.
Troubleshooting Checklist
- 1.Confirm the second argument is TRUE or FALSE, not a word in quotes.
- 2.If you see #NAME?, switch to Excel 2019 or Microsoft 365, or use JOINDRE.TEXTE in French Excel.
- 3.Put the delimiter in quotes, or reference a cell that contains it.
- 4.If the cell shows #VALUE!, the joined text is over 32,767 characters. Join a smaller range.
- 5.For CHAR(10), turn on Wrap Text, or the line breaks stay hidden.
Edge Cases
Every cell in the range is blank and ignore_empty is TRUE
Behavior: TEXTJOIN returns an empty text string.
Solution: Test the result if you need a label: =IF(TEXTJOIN(", ", TRUE, A2:A4)="", "None", TEXTJOIN(", ", TRUE, A2:A4)).
With FALSE, blank cells produce a string made only of delimiters.
A cell contains a formula that returns ""
Behavior: TRUE treats that cell as empty and skips it. FALSE keeps it and writes the delimiter around it.
Solution: Use TRUE when a conditional formula should disappear from the list.
This is the same rule Microsoft documents for empty cells.
The delimiter itself is a number, such as 0
Behavior: Excel converts the number to text and inserts that text between items.
Solution: Use quotes when you want a specific character, or TEXT if you need a format.
A cell reference is also valid: the cell should contain the separator.
Limitations
- •Perpetual Excel 2016 and earlier do not include TEXTJOIN. Those versions return #NAME?.
- •The result cannot exceed 32,767 characters. TEXTJOIN returns #VALUE! rather than a shortened string.
- •TEXTJOIN does not sort the items. Sort the range first, or, in Microsoft 365, join SORT or UNIQUE around the range.
Alternatives
Compatibility
✓ Excel
Since Excel 2019
=TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...) in Excel 2019, Excel 2021, Excel 2024, Microsoft 365, and Excel for the web. Perpetual Excel 2016 returns #NAME?.✓Google Sheets
=TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)Google Sheets uses the same arguments. In a French locale the name is JOINDRE.TEXTE and the separator is a semicolon.
✓LibreOffice
=TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...) in LibreOffice Calc 5.2 and later. A French interface uses JOINDRE.TEXTE.