TEXTJOIN Function
Joins text with a delimiter, optionally skipping blanks.
Syntax
Parameters
| Parameter | Description | Required |
|---|---|---|
| delimiter | A text string inserted between each item, e.g. ", " or "-". Can be empty. | Required |
| ignore_empty | TRUE to skip empty cells/strings; FALSE to include them as gaps. | Required |
| text1 | The first text item, range, or array to join. | Required |
| text2 | Additional text items, ranges, or arrays to join (optional). | Optional |
Basic Example
Join a short list with a comma
=TEXTJOIN(", ",TRUE,"Apple","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 blanksCombine them with a separator
=TEXTJOIN(" | ",TRUE,A1:A5)Example 2: Build a multi-line address
Join street, city, and zip from separate cellsUse a line break as delimiter
=TEXTJOIN(CHAR(10),TRUE,B1,C1,D1)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.
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
TEXTJOIN
textjoinPractice 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.
File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps