Quick Answer

TEXTJOIN Function

Joins text with a delimiter, optionally skipping blanks.

✓ Excel✓ Google SheetsExcel Excel 2016+

Syntax

TEXTJOIN
(delimiter, ignore_empty, text1, [text2], ...)

Parameters

ParameterDescriptionRequired
delimiterA text string inserted between each item, e.g. ", " or "-". Can be empty.Required
ignore_emptyTRUE to skip empty cells/strings; FALSE to include them as gaps.Required
text1The first text item, range, or array to join.Required
text2Additional text items, ranges, or arrays to join (optional).Optional

Basic Example

Join a short list with a comma

=TEXTJOIN(", ",TRUE,"Apple","Banana","")
ResultApple, Banana

The trailing empty string is ignored because ignore_empty is TRUE, so no extra comma appears.

Advanced Examples

Example 1: Join a whole range

Cells A1:A5 contain names with some blanks

Combine them with a separator

=TEXTJOIN(" | ",TRUE,A1:A5)
Result: Names joined by a pipe, blanks skipped
A range is accepted directly and empty cells are omitted.

Example 2: Build a multi-line address

Join street, city, and zip from separate cells

Use a line break as delimiter

=TEXTJOIN(CHAR(10),TRUE,B1,C1,D1)
Result: Street City Zip on separate lines
CHAR(10) is a line break; with wrap-text enabled this renders as multiple lines.

How TEXTJOIN Works

TEXTJOIN iterates through each supplied text value or cell in the ranges, places the delimiter between consecutive non-skipped items, and (when ignore_empty is TRUE) drops empty strings so no stray delimiters appear.

1
Pick a delimiter
Choose the separator, e.g. ", " or CHAR(10).
2
Decide on empties
Set ignore_empty to TRUE to skip blanks.
3
Supply the texts
List ranges or strings, then press Enter.

Important Notes & Limitations

  • Not available in Excel 2013 and earlier; use CONCATENATE or a helper column there.

  • Total result is capped at 32,767 characters; exceeding it returns #VALUE!.

  • Delimiter is added between items only, never before the first or after the last.

Common Errors & Fixes

#NAME? errorUsing TEXTJOIN in an Excel version older than 2016.

Fix: Upgrade, use the free Microsoft add-in, or fall back to CONCATENATE with a helper column.

#VALUE! errorResult longer than 32,767 characters.

Fix: Reduce the number or length of joined items.

Download Practice File

Practice TEXTJOIN with Real Data

Download a sample CSV file with pre-populated data and practice exercises for the TEXTJOIN function. Works in both Excel and Google Sheets.

Works in Google SheetsCompatible with ExcelIncludes exercises

File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps

Related Tutorials

Frequently Asked Questions

Which Excel versions have TEXTJOIN?
Excel 2016 and later, plus Microsoft 365; it is unavailable in Excel 2013 and earlier.
How do I skip blank cells?
Set the second argument, ignore_empty, to TRUE.
Can the delimiter be empty?
Yes, use "" as the delimiter to concatenate without separators.