FormulaCamp
Completed
← All functions
Text

TEXTJOIN

Joins a list with a delimiter.

Syntax

TEXTJOIN(delimiter, ignore_empty, text1, …)

Example: =TEXTJOIN(", ",TRUE,A2:A10)

Available in: Excel 2019+

TEXTJOIN combines the text from several cells or ranges with a delimiter between them: =TEXTJOIN(delimiter, ignore_empty, text1, …). It can skip blanks, which makes it better than CONCAT, CONCATENATE or & for building lists.

When to use it

Arguments explained

Worked examples

Comma-separated list

A
1Name
2Ana
3
4Cara
5Dan

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

Result: Ana, Cara, Dan

TRUE skips the empty cell A3, so there are no doubled commas.

Full name

AB
1FirstLast
2MariaLopez

Formula: D2: =TEXTJOIN(" ",TRUE,A2,B2)

Result: Maria Lopez

A single space is the delimiter.

Build a product code

ABC
1RegionProductYear
2EUPen2024

Formula: E2: =TEXTJOIN("-",TRUE,A2:C2)

Result: EU-Pen-2024

Joins a row range with hyphens. A number such as 2024 is joined as is; use TEXT for leading zeros.

Try it

A tiny spreadsheet with example data. Edit the formula or any number and see the result.

Formula in D2: =TEXTJOIN(", ",TRUE,A2:A5)

Example spreadsheet for TEXTJOIN
ABCD
1TextOtherResult
2Alice Johnsonalice johnsonAlice Johnson, [email protected], extra spaces , SKU-2026-0415
3[email protected][email protected]
4 extra spaces
5SKU-2026-0415
6iced coffee, tea, sugar
7Order 417 shipped
Result in D2: Alice Johnson, [email protected], extra spaces , SKU-2026-0415
Practice this in a lesson: Cleaning Data

Common errors and how to fix them

Related functions

Frequently asked questions

What is the difference between TEXTJOIN and CONCAT?
Both accept ranges, but TEXTJOIN adds a delimiter and can ignore empty cells. CONCAT joins everything directly.
Can TEXTJOIN join only matching rows?
Yes, combine it with FILTER: =TEXTJOIN(", ",TRUE,FILTER(B2:B20,A2:A20="East")).
How do I add a line break between items?
Use CHAR(10) as the delimiter and turn on Wrap Text.
Is CONCATENATE obsolete?
It still works but is kept for compatibility. CONCAT and TEXTJOIN replace it.

More in Text