TEXTJOIN in Excel: Join Text from Arrays and Ranges

Formulas & functions · Updated November 18, 2026

In Excel, use TEXTJOIN to combine text from a range or array into one cell, with a delimiter such as a comma or space. For example, with names in A2:A4, =TEXTJOIN(", ",TRUE,A2:A4) joins the names with commas and skips blank cells.

What TEXTJOIN does

TEXTJOIN takes a delimiter, a setting for whether to ignore empty values, and one or more text arguments. Those arguments can be individual values, cell references, ranges, or arrays. The function combines the supplied items in order and returns one text string in the cell containing the formula.

Its syntax is TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...). The delimiter is inserted between items, not automatically at the beginning or end. Set ignore_empty to TRUE to leave empty cells out, or FALSE to preserve their positions by inserting delimiters for them. The remaining arguments are the text or ranges to combine.

This makes TEXTJOIN useful for turning separate values into a readable list: names into a display label, product codes into a comma-separated line, or address parts into one field. It does not split text into cells; it joins values into a single result.

Join a range with a delimiter

Suppose A2:A5 contains the entries red, blue, a blank cell, and green. With those values in A2:A5, enter this formula in another cell:

=TEXTJOIN(", ",TRUE,A2:A5)

The result is red, blue, green. The comma followed by a space is the delimiter, and TRUE tells Excel to skip the genuinely empty cell. Change the delimiter to a space, slash, line break, or another string to suit the output.

For example, with first, middle, and last names in A2:C2, this formula creates a space-separated name while ignoring blank name parts:

=TEXTJOIN(" ",TRUE,A2:C2)

If A2 is Maya, B2 is blank, and C2 is Chen, the result is Maya Chen, with no doubled space. If the middle-name cell contains a space character rather than being empty, however, it is not skipped. That distinction matters when data has been cleaned inconsistently.

How TEXTJOIN handles arrays

A range is one of the most common kinds of array input: it supplies multiple cell values to a single function argument. TEXTJOIN can also receive an array produced by another formula. In Microsoft 365, for instance, a dynamic-array formula can spill several results into cells, and a spill reference ending in # refers to the whole spilled range.

Suppose a formula in F2 spills the words North, Central, and South into F2:F4. With that spill range in F2#, use this formula to combine the current results:

=TEXTJOIN(" | ",TRUE,F2#)

The result is North | Central | South. Referring to F2# means the join can expand or contract when the spilled results change, rather than requiring you to edit a fixed range. Spill references and the formulas that create them require a version with dynamic-array support, such as Microsoft 365 or Excel 2021 and later.

When a source range contains formulas that return an empty string, such as a formula whose result is "", TEXTJOIN treats that result as empty when ignore_empty is TRUE. It also skips truly blank cells. In contrast, a cell containing spaces or another invisible character is not empty, so it can create an unexpected gap in the joined text.

Join only values that meet a condition

You can combine a condition with TEXTJOIN to make a list from selected rows. Suppose A2:A6 contains task names and B2:B6 contains their status. To list only tasks marked Open, with task names in A2:A6 and statuses in B2:B6, use:

=TEXTJOIN(", ",TRUE,FILTER(A2:A6,B2:B6="Open",""))

If the open tasks are Prepare report and Send invoice, the result is Prepare report, Send invoice. FILTER returns the matching task names, and TEXTJOIN combines that returned array. FILTER is available in Microsoft 365 and Excel 2021 or later. The final "" tells FILTER what to return if it finds no matching rows; in that case the joined result is blank.

An alternative is to pass an IF-generated array directly to TEXTJOIN. With the same task and status layout, this formula also joins names whose status is Open:

=TEXTJOIN(", ",TRUE,IF(B2:B6="Open",A2:A6,""))

In Microsoft 365, enter it normally; dynamic-array calculation handles the condition across the range. This pattern is useful when FILTER is unavailable, but it can be less straightforward to read. In some older Excel versions, array formulas may require Ctrl+Shift+Enter, and support depends on the version. For a new Microsoft 365 workbook, FILTER usually communicates the selection more clearly.

Choose delimiters and preserve formatting

The delimiter can be any text string, including more than one character. Common choices include ", " for a readable list, " - " for a label, and "/" for a compact code. Use "" as the delimiter when you want to concatenate values with nothing between them.

If the source is a list of items that should appear on separate lines in one cell, use CHAR(10) as the delimiter. With item names in A2:A4, this formula puts each nonblank item on a new line:

=TEXTJOIN(CHAR(10),TRUE,A2:A4)

Turn on Home > Wrap Text for the result cell so the line breaks are visible. The cell may also need a taller row. In Excel for Mac and Excel for the web, the formula works, though the ribbon layout can vary slightly; Wrap Text is still the relevant cell-formatting control.

Numbers and dates need extra care. A joined result is text, and TEXTJOIN does not promise to reproduce each source cell’s number format. A date formatted to display as 2 Nov may be joined as its underlying serial value instead. With dates in A2:A3, format each value explicitly inside TEXT before joining:

=TEXTJOIN(", ",TRUE,TEXT(A2:A3,"mmm d"))

For dates of November 2 and November 3, 2026, the result is Nov 2, Nov 3. The desired display pattern belongs in TEXT’s format code; use a pattern suited to the data and regional settings. This example uses an array argument and works in Microsoft 365. For mixed types or complicated formatting, helper cells can make the transformation easier to inspect.

Common problems and how to fix them

  • Unexpected extra separators: Confirm that ignore_empty is TRUE and check for cells containing spaces. A space is a character, not an empty cell. TRIM can remove ordinary leading and trailing spaces from text, but it does not remove every kind of invisible character.
  • A date appears as a number: Apply TEXT with a suitable date format before joining, or create a helper column that contains the desired display text. Cell formatting alone may not carry through into a text result.
  • The formula shows #NAME?: The installed Excel version may not recognize TEXTJOIN, or the function name may be misspelled. TEXTJOIN is supported in Microsoft 365 and Excel 2019 or later; some perpetual Excel 2016 installations do not include it.
  • The result shows #VALUE!: Check whether the combined text exceeds Excel’s per-cell text limit of 32,767 characters. Also inspect source formulas for errors, which can propagate through the joined result.
  • The formula is rejected: The examples here use commas between function arguments. Some regional settings use semicolons instead. In that case, replace argument-separating commas with semicolons while keeping commas inside quoted text unchanged.
  • The output is cut off visually: The cell may contain more text than is visible in its current width. Widen the column, use Wrap Text, or inspect the formula bar. If the actual result exceeds Excel’s cell text limit, changing the display width will not fix it.

Also check whether your source range includes headers, totals, or unrelated cells. TEXTJOIN will join whatever values are included; it does not know which entries are meaningful. A carefully chosen range or a condition that filters the data is safer than selecting an entire column when the sheet contains other text.

TEXTJOIN compared with CONCAT and CONCATENATE

CONCAT can combine text and ranges, but it does not provide a delimiter setting or an option to ignore empty values. You can include separators by adding separate arguments, but that becomes cumbersome when the number of values changes. TEXTJOIN is usually the clearer choice for lists that need a repeated separator.

CONCATENATE is an older function that combines individual text arguments. Microsoft retains it for compatibility, but CONCAT is its more recent successor, and TEXTJOIN is better suited to joining a range with a chosen delimiter. None of these functions splits a combined string into separate cells; for that task, use an appropriate text-splitting feature or function available in your Excel version.

TEXTJOIN also does not sort values, remove duplicates, or apply criteria by itself. If those steps matter, prepare the array first—for example, with FILTER for selection or UNIQUE for distinct values in supported versions—then pass the result to TEXTJOIN. Separating selection from joining makes a formula easier to troubleshoot.

Availability and practical limits

TEXTJOIN is included in Microsoft 365 and Excel 2019 or later, including current Excel for Mac and Excel for the web. If you share a workbook with someone using an older Excel release that lacks the function, that person may see an unsupported-function error. When compatibility is uncertain, check the recipient’s version or provide a plain-text result as well.

The formula examples use standard comma argument separators. Excel’s regional configuration may require semicolons, and date-format interpretation can vary with locale. TEXTJOIN returns text, so the result is suitable for display or export, but it is not a numeric list that Excel can calculate with as though the original values were still separate. Keep source values in their own cells if you need to sort, filter, or calculate with them later.

Frequently Asked Questions

How do I join an array of cells in Excel?
Use TEXTJOIN with a delimiter and the range or array as an argument. For example, with values in A2:A10, =TEXTJOIN(", ",TRUE,A2:A10) makes a comma-separated list and skips empty cells.

Can TEXTJOIN combine cells without a separator?
Yes. Set the delimiter to an empty string, written as "". The values are then placed directly next to one another. Choose a delimiter such as a space if adjacent values would otherwise be hard to distinguish.

What is the difference between TRUE and FALSE in TEXTJOIN?
TRUE skips empty values, while FALSE keeps empty positions in the input and therefore can leave repeated delimiters. Neither setting removes spaces or other characters from a cell.

Can TEXTJOIN join cells that meet a condition?
Yes. In Microsoft 365 or Excel 2021 and later, combine TEXTJOIN with FILTER to select matching values first. For example, filter names by a status column, then join the returned array with a comma and space.

Why does TEXTJOIN return a date as a number?
TEXTJOIN produces text and may use a date’s underlying value rather than its displayed cell format. Convert the date to the intended display text with TEXT before joining, or use a helper column with formatted text.

Is TEXTJOIN available in Excel for Mac?
Yes, current Microsoft 365 and supported later Excel versions for Mac include TEXTJOIN. The function syntax is the same; ribbon placement and some regional argument separators can differ from a Windows setup.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.