The TEXTJOIN function in Excel combines text from several cells with a delimiter and can skip empty values. Use it for full names, product lists, addresses or multiline descriptions. For a result without writing formulas, use the cell-combining tool.
| Introduced in | Excel 2019 |
TEXTJOIN syntax and supported Excel versions
TEXTJOIN is available in Excel 2019, 2021, 2024 and Microsoft 365. Excel 2013 and 2016 do not have it; a classic alternative comes first below. The function returns text in a normal cell. It does not merge the grid cells or change the sheet layout.
=TEXTJOIN(delimiter,ignore_empty,text1,[text2],...)| Argument | What to provide |
| delimiter | Text between values: a space, comma plus space, an empty string, or a reference to a delimiter cell. |
| ignore_empty | TRUE skips empty cells; FALSE retains their positions between delimiters. |
| text1, text2, … | Cells, ranges, literal text and results of other formulas. Up to 252 text arguments are allowed; each may be a range. |
Unlike CONCATENATE, TEXTJOIN accepts whole ranges and inserts a delimiter between their values. The reverse operation is covered by TEXTSPLIT in Excel 2024 and Microsoft 365.
Join text in Excel 2013 without TEXTJOIN
In Excel 2013, combine & with IF for three cells in A2:C2. For example, A2 contains “John”, B2 is empty and C2 contains “Smith”. This returns “John Smith” with one space. Empty cells are skipped, zero values are kept, and Enter is sufficient.
=A2&IF(B2="","",IF(A2="",""," ")&B2)&IF(C2="","",IF(A2&B2="",""," ")&C2)For a list in A2:A5, a running concatenation is more manageable. In empty B2, refer to the first item:
=A2Enter the following in B3 and fill down to B5. B5 contains the comma-separated list with empty entries skipped. For another list, adjust the final filled row.
=IF(A3="",B2,IF(B2="",A3,B2&", "&A3))Join text with a delimiter and skip blanks
Excel 2019 and later can produce the same result with one function. The first argument is a space, the second is TRUE and the third is the source range. Select a result cell in the table to copy its formula.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | First | Middle | Last | Skip blanks | Keep blanks |
| 2 | John | Smith | John Smith=TEXTJOIN(" ",TRUE,A2:C2) | John Smith=TEXTJOIN(" ",FALSE,A2:C2) | |
| 3 | Anna | Maria | Brown | Anna Maria Brown=TEXTJOIN(" ",TRUE,A3:C3) | Anna Maria Brown=TEXTJOIN(" ",FALSE,A3:C3) |
| 4 | 0 | items | 0 items=TEXTJOIN(" ",TRUE,A4:C4) | 0 items=TEXTJOIN(" ",FALSE,A4:C4) |
E2 has two spaces between the first and last name: one before empty B2 and another after it. TRUE skips empty items; it does not remove spaces from a nonempty cell. If B2 contains a space, clean the input with TRIM. A zero is not an empty value.
For a one-off combination of selected cell values, the add-in tool avoids a helper formula. For the opposite task, see how to split a list into separate rows.
Join a range into a list or separate lines
Use the quoted delimiter “, ” for a name list in A2:A5. For example, Anna, an empty cell, Bob and Cleo become “Anna, Bob, Cleo”. Put the formula in any empty cell outside A2:A5.
=TEXTJOIN(", ",TRUE,A2:A5)A rectangular range is read row by row: A2, B2, C2, then A3, B3, C3. For a different order, pass separate ranges in the order you need. TEXTJOIN does not sort the source values.
To place each item on a separate line, use CHAR(10) as the delimiter. Turn on Wrap Text in the result cell to see the line breaks. The source cells remain separate.
=TEXTJOIN(CHAR(10),TRUE,A2:C2)Conditional joining and dates in text
Suppose A2:A6 holds regions, B2:B6 holds managers and C2 contains the required region. In Excel 2019, use IF and confirm the formula with Ctrl+Shift+Enter. Excel 2021–2024 and Microsoft 365 need only Enter. Nonmatching rows become empty strings and TEXTJOIN skips them.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Region | Manager | Find region | Managers |
| 2 | East | Anna | East | Anna, Cleo, Eve=TEXTJOIN(", ",TRUE,IF($A$2:$A$6=C2,$B$2:$B$6,"")) |
| 3 | West | Bob | West | Bob, Dan=TEXTJOIN(", ",TRUE,IF($A$2:$A$6=C3,$B$2:$B$6,"")) |
| 4 | East | Cleo | ||
| 5 | West | Dan | ||
| 6 | East | Eve |
Duplicates are kept: if a manager appears twice in the source, that name appears twice in the list. Removing repetitions is a separate task, covered in the article on repeated words. An Excel 2013 conditional join is shown in the helper-column example.
Dates need care: Excel stores them as numbers and does not carry a cell’s display format into joined text. If A2 contains “Order 4512” and B2 holds November 28, 2026, format the date with TEXT first:
=TEXTJOIN(" | ",TRUE,A2,TEXT(B2,"yyyy-mm-dd"))The result “Order 4512 | 2026-11-28” is text. Keep the original date in B2 for calculations. The same principle applies to currency and percentages: TEXTJOIN does not preserve number formatting by itself.
Date-format letters follow your Excel regional settings. If the formula displays the letters themselves, build the date from DAY, MONTH and YEAR. This version uses only the numeric format 00:
=TEXTJOIN(" | ",TRUE,A2,YEAR(B2)&"-"&TEXT(MONTH(B2),"00")&"-"&TEXT(DAY(B2),"00"))Combine cell values without writing formulas
A formula is useful when the result must recalculate. For one-off processing, select the cells and use Combine selected cells in Excel with !SEMTools: choose the delimiter and get the combined text without typing or filling formulas. Check the result on a copy of the relevant range before processing a working file.
If the text needs to go the other way, use splitting a cell by a delimiter. That is the opposite operation on the same list.
Why TEXTJOIN does not work
#NAME? error. Excel 2013 and 2016 do not have this function. Use the & alternative above. In a supported version, check that you are using the function name for your Excel language.
#VALUE! when joining a large list. The result cannot exceed 32,767 characters. Split the list into multiple results; changing TRUE to FALSE does not remove the limit.
Extra delimiters. Check the second argument and the source cells: a space or invisible character is not an empty cell. Clean the source first when necessary.
One source error breaks the result. A #N/A or other error in the source propagates into the joined text. Fix its cause; if errors should deliberately be skipped, use IFERROR inside TEXTJOIN.
For A2:A5, confirm this version with Ctrl+Shift+Enter in Excel 2019, or Enter in Excel 2021–2024. It hides source errors, so use it deliberately.
=TEXTJOIN(", ",TRUE,IFERROR(A2:A5,""))The IFERROR reference explains when skipping errors makes sense.
Combine cell values with your chosen delimiter right in the selected range in Excel with !SEMTools. No TEXTJOIN syntax to remember, formulas to fill down or results to paste back as values.
Summary: when to use TEXTJOIN
I hope you found what you were looking for on this page and managed to join your text with the required delimiter. In Excel 2013, use & with IF or a running concatenation; Excel 2019 and later can shorten this with TEXTJOIN. Use a formula for recalculating lists and the add-in tool for processing selected values in place. Browse the other references in the Excel functions guide.