TEXTJOIN Function

Joins text with a separator between each piece, optionally skipping blanks.

Category

Text

Available in

Excel 2019+, Microsoft 365

Returns

Text

Taught hands-on in Level 4: Advanced Dynamic Arrays & Logic - Advanced Math & Text module

Overview

TEXTJOIN joins a list of values with a separator — a comma, a space, a line break — and can ignore empty cells so you never get “, ,”.

Combined with FILTER it turns a list of matches into one tidy line.

Syntax

=TEXTJOIN(delimiter, ignore_empty, text1, [text2], …)

Arguments

ArgumentRequired?What it does
delimiterYesWhat goes between each piece, such as ", ".
ignore_emptyYesTRUE skips blank cells; FALSE keeps them (and their separators).
text1, …YesThe cells, ranges or text to join.

Examples

Example 1 — Skills list without gaps

Each person ticked a few skills; some cells are blank.

E2fx=TEXTJOIN(", ", TRUE, B2:D2)
ABCDE
1NameSkill 1Skill 2Skill 3Skills
2AnaExcelVBAExcel, VBA
3BenPower QueryExcelPower Query, Excel
=TEXTJOIN(", ", TRUE, B2:D2) Explain

Example 2 — Everyone in a region

List every rep in the West region in one cell.

D2fx=TEXTJOIN(", ", TRUE, FILTER(A2:A6, B2:B6="West"))
ABCD
1RepRegionWest team
2AnaWestAna, Cara, Eli
3BenEast
4CaraWest
5DevNorth
6EliWest
=TEXTJOIN(", ", TRUE, FILTER(A2:A6, B2:B6="West")) Explain

Common mistakes

  • 32,767-character limit. A joined result longer than that returns #VALUE!.

Notes

  • Use CHAR(10) as the delimiter for one item per line (turn on Wrap Text).
  • Related functions: CONCAT, TEXTSPLIT, FILTER.
Kyle Stott

Author

Kyle Stott

Certified Microsoft Excel Expert

Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.