If TEXTJOIN in Excel is not working, first check that the function is spelled TEXTJOIN, your Excel version supports it, and your formula uses the correct argument separators. For example, with names in A2:A6—Ada, a blank cell, Ben, a formula returning an empty string, and Cara—=TEXTJOIN(", ",TRUE,A2:A6) returns Ada, Ben, Cara. The checks below explain how to fix errors, missing separators, blank results, and other common surprises.
How TEXTJOIN works
TEXTJOIN combines text from multiple cells or text values into one result. Its arguments specify the delimiter, whether empty values should be ignored, and the items or ranges to combine. The delimiter is inserted between included values, not automatically before the first value or after the last one. A comma followed by a space is a common delimiter; a hyphen, space, slash, or line break can work too.
With names in A2:A4 containing Ana, Bo, and Cy, this formula returns Ana, Bo, Cy: =TEXTJOIN(", ",TRUE,A2:A4). The second argument, TRUE, tells Excel to skip empty cells. Change it to FALSE if empty positions should still contribute separators. With A2:A4 containing Ana, a blank, and Cy, that setting produces a delimiter for the blank position, so the result has two commas with an empty space between them.
You can supply a range, several ranges, or individual text values. For instance, a formula can join a first name and last name with a space, or combine a column of labels using a chosen separator. TEXTJOIN returns one text value in the formula cell; it does not merge worksheet cells or rearrange the source data.
Check the formula and Excel version first
Confirm that the function name has no space: it is TEXTJOIN, not “TEXT JOIN.” Check the opening and closing parentheses, commas inside quoted delimiters, and the cell references. Excel typically adds the final parenthesis as you enter a formula, but a missing quote or separator can still make it invalid. Click the formula bar and inspect the formula itself rather than relying only on what appears in the cell.
TEXTJOIN is available in Excel 2019 and later desktop versions, including Microsoft 365, and in Excel for the web. If you open the workbook in Excel 2016 or an earlier desktop release, the function may not be recognized even if the workbook was created in a newer version. Updating Excel or opening the file in a supported version is the simplest fix; otherwise, use an older-compatible alternative such as concatenation with the ampersand operator.
Excel may also use semicolons instead of commas between function arguments, depending on regional settings. The formulas here use commas, as in a standard English-language Excel setup. If Excel marks a formula as invalid as soon as you enter it, check the list separator configured for your system and use the separator Excel expects. This is different from the delimiter inside quotation marks: ", " is text to place between joined values, not an argument separator.
Fix common errors such as #NAME? and #VALUE!
- #NAME? often means Excel does not recognize the function. Check the spelling and version first. It can also appear when text in a formula is missing quotation marks or a name has been typed where a cell reference was intended.
- #VALUE! can occur if the joined result exceeds Excel’s 32,767-character cell limit. Shorten the source text or divide the result across cells. TEXTJOIN also has a limit of 252 text arguments, although a range can be supplied as a single argument.
- An error already in the source range can pass through to the result. If a source cell contains an error such as
#N/A, inspect that source formula and correct it or handle the error at its source. - A formula displayed as text may be stored in a cell formatted as Text, or the entry may begin with an apostrophe. Change the cell format to General, then re-enter the formula. Changing the format alone may not recalculate text already entered as a literal.
If the result looks stale after you change a source cell, check the workbook’s calculation mode. In Windows desktop Excel, use Formulas > Calculation Options > Automatic to enable automatic recalculation. Manual calculation can make formulas appear not to update until recalculation is triggered. Excel for Mac has calculation options too, although the ribbon layout can differ; Excel for the web generally recalculates formulas automatically.
Understand blanks, empty strings, and repeated delimiters
A truly empty cell and a formula that returns an empty string can look alike on the worksheet. When the ignore-empty argument is TRUE, TEXTJOIN skips empty values, including zero-length text results in common worksheet use. This is useful when a list has optional fields: the output can omit missing entries rather than showing awkward extra separators. If the argument is FALSE, empty positions can leave adjacent delimiters.
For example, with A2:A5 containing North, a blank cell, South, and East, the following formula returns North | South | East: =TEXTJOIN(" | ",TRUE,A2:A5). If you see doubled separators, check whether ignore_empty is FALSE, whether a source cell contains a space rather than being truly empty, or whether the source values themselves include separators. A cell containing one or more spaces is not an empty value, so TEXTJOIN will include it.
To remove extra spaces from source text, clean the inputs before joining them, or use helper cells to apply TRIM to each entry. TRIM removes leading and trailing ordinary spaces and reduces repeated internal spaces to one; it does not remove every possible nonprinting character. If imported data still looks blank but is not skipped, inspect the source with a helper formula or clean it at import. Also remember that a formula such as =IF(B2="","",B2) returns an empty string when its condition is true, rather than leaving the cell genuinely empty.
Check numbers, dates, and displayed formatting
TEXTJOIN converts values into text, but it does not reliably carry over the visual number format shown in the cells. Dates are stored as serial numbers in Excel, so a joined date may appear as a number instead of a familiar date. Currency, percentages, and leading zeros can have the same issue: the displayed format is not necessarily the underlying value that gets combined.
With a date in A2 and an event name in B2, for example, the formula below formats the date explicitly and returns a result such as Nov 2, 2026 — Review when A2 contains November 2, 2026 and B2 contains Review: =TEXTJOIN(" — ",TRUE,TEXT(A2,"mmm d, yyyy"),B2). The TEXT function’s format code controls how the date is rendered. Choose a format appropriate to the workbook and audience; date appearance can otherwise be confusing when workbooks move between regional settings.
For identifiers such as product codes or postal codes, consider storing values as text if leading zeros are meaningful. Formatting a number to display a leading zero does not always mean that zero will be included in a joined text result. If the value must remain numeric for calculations, use an explicit TEXT format for that value before joining it.
Choose the right delimiter and output format
The delimiter determines whether the result is readable and usable in its destination. Use a comma and space for a simple list, a tab when pasting into another application, or a line break for a vertical-looking list inside one cell. For a line-break delimiter, the cell layout is values in A2:A5; this formula joins the nonempty entries with line breaks: =TEXTJOIN(CHAR(10),TRUE,A2:A5). Then select Home > Wrap Text so the lines can display within the cell. Row height may need adjusting to show all lines.
One common misconception is that joining with commas creates a properly escaped CSV file. TEXTJOIN simply inserts the delimiter; it does not automatically quote fields containing commas or escape embedded quotation marks. A joined string can therefore be ambiguous if a source value itself contains the delimiter. For a list meant for people to read, that may be acceptable. For data exchange, use a proper export workflow or account for quoting rules rather than assuming a comma-joined cell is a complete CSV format.
TEXTJOIN alternatives and when to use them
If TEXTJOIN is unavailable, the ampersand operator can combine a small, fixed number of values. With first name in A2 and surname in B2, this formula returns Ada Lovelace when those cells contain Ada and Lovelace: =A2&" "&B2. It is convenient for a few cells, but it does not automatically skip blank entries; a blank A2 can leave an unwanted leading space.
CONCAT can combine text and ranges but does not provide TEXTJOIN’s delimiter and ignore-empty arguments. CONCATENATE is an older function retained for compatibility, but it also requires delimiters to be inserted manually. If you need to split text back into columns rather than combine it, TEXTSPLIT is available in Microsoft 365 and Excel 2024. These functions solve related but different tasks, so choose based on whether you need a separator, blank handling, or a reverse split.
Frequently Asked Questions
Why does Excel say TEXTJOIN is not a valid function?
Check that it is spelled TEXTJOIN and that the workbook is open in Excel 2019 or later, Microsoft 365, or Excel for the web. Older Excel desktop releases may not support the function. Also check whether your regional settings require semicolons between arguments.
How do I make TEXTJOIN ignore blank cells?
Set its second argument to TRUE. For example, with the values to combine in A2:A10, =TEXTJOIN(", ",TRUE,A2:A10) joins the nonempty entries with comma-space separators. Cells containing spaces are not truly empty and may still appear in the output.
Why does TEXTJOIN show a number instead of a date?
Excel stores dates as serial values, and TEXTJOIN may use the underlying value rather than the cell’s display format. Format the date explicitly with the TEXT function before joining it, using a date format that suits your workbook.
Can TEXTJOIN combine cells across multiple columns?
Yes. You can provide multiple ranges or a larger rectangular range. If you use a rectangular range, Excel processes its cell values in order by rows, so check that this order matches the sequence you want in the final text.
Why are there extra commas in my TEXTJOIN result?
Check whether the ignore-empty argument is FALSE, whether apparently blank cells contain spaces, and whether the source text already includes commas. Set the argument to TRUE and clean values that contain whitespace if those entries should be skipped.
Related
- Excel conditional formatting based on another cell?
- How to Calculate Age in Excel from Date of Birth
- Excel Not Clicking the Correct Cell? Causes and Fixes
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Errors & fixes
- Excel Not a Number? Understand #NUM! and ISNUMBERIn Excel, “not a number” can refer to the #NUM! error, which means a formula cannot produce a…
- SUMIFS Excel: Common Errors and How to Fix ThemSUMIFS errors usually come from a misplaced argument, ranges that do not match, or criteria that do not…
- Excel Freezing? Fix a Workbook That Stops RespondingIf Excel is freezing, first wait briefly to see whether it is finishing a calculation or loading a…
- Excel Not Letting You Type in a Cell? How to Fix ItIf Excel will not let you type in a cell, first check whether the worksheet is protected, the…
- VLOOKUP in Excel: Find Matching Values and Fix ErrorsTo find a matching value in Excel, use VLOOKUP with an exact-match setting. For example, if IDs are…
- Excel Not Auto Filling Text? Fix the Common CausesIf Excel is not auto-filling text, check the feature you mean: turn on AutoComplete for suggestions based on…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.