TEXTJOIN — The Delimiter-Aware Text Joiner
The upgrade over CONCAT that everyone needed. Adds an automatic delimiter between values AND lets you skip empty cells cleanly. Perfect for CSV construction, mailing lists, comma-separated tags, multi-line output, and every "combine this range with a separator" job you've ever done manually with the & operator.
& operator manually — verbose but works everywhere. See the compatibility section for full fallback patterns.The two killer features
TEXTJOIN exists because CONCAT is missing these two things. Every other "how do I join text?" question in Excel comes down to whether you need one or both:
Automatic delimiter
First argument. Whatever string you pass gets inserted BETWEEN each value automatically. No more & ", " & repeated everywhere.
Skip empty cells
Second argument. Set TRUE and empty cells are ignored — no double delimiters where blanks used to be. Set FALSE to include them.
Syntax breakdown
TEXTJOIN takes three or more arguments. The first two set behavior; the rest are the values you want joined.
| Argument | Type | What it does |
|---|---|---|
delimiter |
REQUIRED | The string inserted BETWEEN each pair of values. Text in quotes (", ", " | ", ""), CHAR() for special chars (CHAR(10) for line break), or a cell reference. |
ignore_empty |
REQUIRED | TRUE to skip empty cells (no double delimiters). FALSE to include them (creates "A,,C" where B was empty). Almost always TRUE. |
text1 |
REQUIRED | The first value or range to include. Cell, literal string, number, or range. |
text2, text3, ... |
OPTIONAL | Additional values or ranges. Up to 252 more arguments. Each gets a delimiter placed before it (except the first). |
ignore_empty=TRUE) and inserts your delimiter BEFORE it — except the very first value. Result: N values → N-1 delimiters. Never a leading or trailing delimiter.
Five working examples
Every example uses the 10-row contact table from the workbook — first names, last names, departments, cities, states, phone numbers, and email parts.
01 The basic delimiter — comma-separated list
Join a range of cells with commas between them. The single most common TEXTJOIN use.
| First | Last | Dept | City | State | Comma-joined |
|---|---|---|---|---|---|
| Emma | Thompson | Sales | Austin | TX | Emma, Thompson, Sales, Austin, TX |
| David | Kim | Engineering | Seattle | WA | David, Kim, Engineering, Seattle, WA |
| Sofia | Rodriguez | Marketing | Miami | FL | Sofia, Rodriguez, Marketing, Miami, FL |
The old way needed =B2&", "&C2&", "&D2&", "&E2&", "&F2 — five ampersands and four repeated delimiters. TEXTJOIN needs the delimiter exactly once.
02 Different delimiters, same data
Any string can be your delimiter. Five common choices, all applied to the same 5-cell row.
Same data, five delimiter styles
CHAR(10) is the ASCII line-feed character. Use it as your delimiter, then enable Wrap Text on the cell (Home ribbon → Wrap Text), and each value appears on its own line. Perfect for address blocks, multi-line labels, or condensed reports. On Mac, use CHAR(13).
Setting the delimiter to "" (empty string) makes TEXTJOIN behave exactly like CONCAT — same output, more verbose syntax. If you're joining without a delimiter, prefer CONCAT.
03 The ignore_empty flag — the second killer feature
What happens when data has gaps. TRUE cleans them up; FALSE preserves them (with visible double delimiters).
Scenario: address blocks where suite/apartment is optional
| Name | Street | Suite | City | State | ZIP |
|---|---|---|---|---|---|
| Emma | 123 Main St | Suite 400 | Austin | TX | 78701 |
| David | 456 Oak Ave | (empty) | Seattle | WA | 98101 |
| Sofia | 789 Palm Rd | Apt 12B | Miami | FL | 33101 |
| Michael | 321 Tech Blvd | (empty) | San Jose | CA | 95101 |
Same formula, opposite behavior
ignore_empty = FALSE (bad)
David's row where suite is empty:
Double comma looks broken to anyone reading it. Never do this for user-facing output.
ignore_empty = TRUE (good)
David's row where suite is empty:
Clean output. The empty cell is invisible. Almost always what you want.
When to use FALSE?
- Fixed-format CSV export where downstream tools expect a specific column count and empty fields signal "no value here."
- Data validation output where the position of empty cells matters (e.g., "the missing field is column 3").
- Otherwise: use TRUE. If you're building output for humans, TRUE is nearly always right.
04 Build a semicolon-separated mailing list
Turn a column of email addresses into one string ready to paste into Outlook or Gmail's BCC field.
With filtering — only Sales team
Comma-separated for CSV export
Note FALSE here — CSV downstream tools EXPECT empty fields to appear as empty (creating ,,) to preserve column positions. This is one of the few cases where FALSE is correct.
05 Multi-line output with CHAR(10)
Build a formatted address block or multi-item summary that displays on multiple lines inside one cell.
What you see in the cell:
Two-step workflow
- Write the TEXTJOIN with
CHAR(10)as delimiter. - Enable Wrap Text on the cell — Home ribbon → Alignment → Wrap Text.
CHAR(13) instead of CHAR(10). Different OS, different newline character. If cross-platform matters, most modern Excel versions accept both.
Interactive playground
Try it Live TEXTJOIN demonstration
Mirrors live cells from the workbook. Edit the yellow input, watch the blue result update.
Download the workbook to try the mailing-list, delimiter demos, and CHAR(10) multi-line examples live.
The TEXTJOIN cheat sheet — 10 patterns for daily use
Copy any of these, adapt the ranges to your data, and you're 80% of the way there:
10 patterns you'll use every day
From simple comma-lists to CHAR(10) multi-line, filtered mailing lists, and CSV rows.
Common errors and how to fix them
TEXTJOIN is straightforward but has a few gotchas. Six common scenarios:
| Result | Why it happens | Broken → Fix |
|---|---|---|
| NAME error | You're on Excel 2016 or earlier. TEXTJOIN didn't exist until Excel 2019. | =TEXTJOIN(", ", TRUE, A2:C2) // NAME error
=A2&", "&B2&", "&C2 // manual ampersand chain |
| Missing FALSE/TRUE | Forgot the ignore_empty argument. Both parameters are required. | =TEXTJOIN(", ", A2:F2) // Too few arguments
=TEXTJOIN(", ", TRUE, A2:F2) |
| Double delimiters | Used FALSE when data has empty cells. Adjacent delimiters look broken. | =TEXTJOIN(", ", FALSE, ...) // "A, , C"
=TEXTJOIN(", ", TRUE, ...) // "A, C" |
| Line break invisible | Used CHAR(10) but Wrap Text is disabled on the cell. |
Cell shows: "abcdef" all on one line
Home → Wrap Text (or Ctrl+1 → Alignment tab → Wrap text) |
| VALUE error | Output exceeded 32,767 characters (Excel's cell text limit). | =TEXTJOIN(", ", TRUE, A:A) // 100K rows overflows
Filter first, or split across multiple cells |
| Wrong format | Numbers concatenated as raw digits, losing formatting. | =TEXTJOIN(" | ", TRUE, TEXT(A2, "$#,##0.00"), B2)
Wrap each number in TEXT() explicitly |
The Text-Join family — four ways to combine
Meet the family
Excel has four ways to join text. Each solves a slightly different problem. This page is TEXTJOIN — the delimiter-aware modern default.
TEXTJOIN is the strict superset of CONCAT — anything CONCAT does, TEXTJOIN can do with the empty delimiter "". But TEXTJOIN also handles delimiters and empty cells. Reach for CONCAT when the direct-join syntax reads better; otherwise TEXTJOIN is the go-to.
Related functions
Excel version compatibility
TEXTJOIN shipped in Excel 2019. For older versions, chain the & operator manually:
| Platform | Supports TEXTJOIN? | Notes |
|---|---|---|
| Excel 365 (Windows & Mac) | ✓ Yes | Full support |
| Excel 2021 | ✓ Yes | Full support |
| Excel 2019 | ✓ Yes | Introduced here |
| Excel 2016 / 2013 / 2010 / 2007 / 2003 | ✗ No | Chain & manually |
| Excel for the web | ✓ Yes | Full support |
| Excel on iPad & iPhone | ✓ Yes | Full support |
| Google Sheets | ✓ Yes | Same syntax |
| LibreOffice Calc | ✓ Yes | Full support |
| Apple Numbers | ✓ Yes | Full support |
Fallback for older Excel
If you must support Excel 2016 or earlier, chain the & operator with your delimiter as a literal:
Verbose and repetitive, but works in every Excel version since 1985. No ignore_empty equivalent — you'd need nested IFs: =A2&IF(B2="","",", "&B2)&IF(C2="","",", "&C2). This is exactly the pain TEXTJOIN was designed to eliminate.
When to use TEXTJOIN vs. alternatives
Use TEXTJOIN when…
- You need a delimiter between values. The core reason TEXTJOIN exists. Comma, space, pipe, CHAR(10) — whatever.
- Your data has empty cells to skip. ignore_empty=TRUE is the only clean way.
- You're building CSV, mailing lists, or multi-line output. The three biggest wins.
- You're joining a range with a separator. Beats writing
=A&","&B&","&C.
Use CONCAT instead when…
- You don't need a delimiter — glue values directly.
- The direct-join syntax reads more naturally for your case.
- Building SKUs, prefixed IDs, or file paths with no separator.
Use the & operator instead when…
- You have 2-3 values and want compact syntax.
- Cross-version support (works in Excel 2003 and every version since).
Use CONCATENATE instead when…
- You're editing legacy files where changing everything isn't worth it.
- Otherwise, don't — it's strictly worse than modern alternatives.
How TEXTJOIN actually works
The algorithm
TEXTJOIN walks each argument in order. For each non-empty value (if ignore_empty=TRUE), it appends the value to the output. Before appending, if this isn't the first value included, it prepends the delimiter. Result: N included values yield N-1 delimiters between them, never at the start or end.
Empty vs blank vs whitespace
ignore_empty=TRUE skips cells that are TRULY empty (never had a value or explicit blank). It does NOT skip:
- Cells containing the empty string
""(which count as content, though zero-length) - Cells containing spaces or tabs (whitespace is real content)
- Cells containing zero or FALSE (both count as real values)
If your "empty" cells actually contain "" from a formula, wrap the argument in IF(A2="", NA(), A2) and… actually, that gets messy. Cleanest fix: use TEXTJOIN with a filter pattern.
Character limit
Output cannot exceed 32,767 characters — Excel's cell text limit. TEXTJOIN over a huge range returns VALUE if the result overflows. In practice this only affects joins over 10,000+ small cells or 500+ long ones.
Number and date handling
Numbers become their default text representation (raw digits). Dates become serial numbers. Wrap in TEXT() to preserve formatting: =TEXTJOIN(", ", TRUE, TEXT(A2:A10, "$#,##0")).
Performance notes
TEXTJOIN is fast for most cases. Three considerations for edge cases:
- Range size. Joining a 100K-row range is slow. TEXTJOIN visits every cell. Filter first when possible.
- ignore_empty check. When TRUE, TEXTJOIN checks each cell for emptiness — small per-cell overhead. Rarely noticeable.
- Long output. Output approaching 32K characters slows rendering. Split into multiple cells if you can.
How to write a TEXTJOIN from scratch
-
Check your Excel version
TEXTJOIN needs Excel 2019 or later. On 2016 or earlier, chain
&manually. -
Choose your delimiter
Comma-space for readability, pipe for CSV-alternative, CHAR(10) for multi-line, empty string to behave like CONCAT.
-
Decide about empty cells
TRUE (almost always) skips blanks cleanly. FALSE keeps them and creates double delimiters.
-
Pass the values or range
Individual cells, literals in quotes, or a range. Multiple arguments allowed (up to 252 total).
-
For multi-line output, enable Wrap Text
CHAR(10) as delimiter alone won't show line breaks. Home → Wrap Text on the cell reveals them.
Functions used with TEXTJOIN
Frequently asked questions
What's the difference between TEXTJOIN and CONCAT?
TEXTJOIN adds two features CONCAT doesn't have: (1) an automatic delimiter between values, (2) an ignore_empty flag to skip blank cells. If you need "A, B, C" formatting or want to skip blanks, use TEXTJOIN. If you just want to glue values end-to-end, use CONCAT — its syntax reads more naturally for that.
Why does TEXTJOIN give a NAME error?
You're on Excel 2016 or earlier. TEXTJOIN was introduced in Excel 2019. Upgrade to Excel 2019/365, or chain the & operator manually with your delimiter as literal text.
How do I add a line break with TEXTJOIN?
Use CHAR(10) as the delimiter: =TEXTJOIN(CHAR(10), TRUE, A2:A5). Then enable Wrap Text on the cell (Home ribbon → Wrap Text) to see the breaks. On Mac, use CHAR(13).
What does ignore_empty actually do?
When TRUE, TEXTJOIN skips truly-empty cells so you don't get double delimiters like "A, , C". When FALSE, empty cells are included as empty strings, creating those double delimiters. TRUE for humans, FALSE for fixed-format CSV where column positions matter.
Can TEXTJOIN skip cells containing empty string?
No — "" from a formula counts as content. ignore_empty only skips truly-empty cells. Workaround: filter with IF and use array formulas, or clean the source data first.
How many arguments can TEXTJOIN take?
Up to 252 individual arguments (plus delimiter and ignore_empty flag = 254 total). Use range arguments for large lists.
Does TEXTJOIN work in Google Sheets?
Yes, with identical syntax. Google Sheets, LibreOffice, and Apple Numbers all implement TEXTJOIN.
Can I use TEXTJOIN with a condition (like SUMIFS)?
Yes — combine with IF for filtered lists: =TEXTJOIN(", ", TRUE, IF(B:B="Sales", A:A, "")). This returns only names where Dept = "Sales". Requires Excel 365's dynamic arrays for this exact pattern; on older versions, wrap in {...} as an array formula.
What's the maximum length of a TEXTJOIN result?
32,767 characters — Excel's cell text limit. Trying to exceed this returns a VALUE error. Rarely matters unless you're concatenating tens of thousands of cells.
How do I preserve currency formatting in TEXTJOIN?
Wrap each numeric value in TEXT(): =TEXTJOIN(", ", TRUE, TEXT(A2:A10, "$#,##0.00")). Without TEXT, numbers become raw digits and lose their formatted display.
Should I use TEXTJOIN with delimiter="" instead of CONCAT?
They produce identical output. Use CONCAT for direct joins — the syntax reads more naturally. TEXTJOIN with empty delimiter works but is more verbose for no gain.
Which templates use TEXTJOIN?
Most templates that build multi-part display strings. Prominently: Invoice (line-item lists), Sales Dashboard (top-performer summaries), KPI Dashboard (status message construction), Employee Attendance (present-today lists), Timesheet (task-list concatenation), Inventory Tracker (low-stock warnings), Project Timeline (task-owner concatenations), and Expense Report (category-list summaries).
Templates that use TEXTJOIN
8 of our 10 templates use TEXTJOIN for building multi-part display strings and lists:
Skip the syntax. Ask in plain English.
The Sheets & Cells AI Add-in writes TEXTJOIN, CONCAT, and every text-join pattern in between — right inside Excel. Type "combine these emails with semicolons and skip blanks" and get the working formula, ready to paste.
Try the AI Add-in →