TEXTJOIN formula

Combines a range of cells into a single piece of text, separated by a delimiter you choose, and can automatically skip empty cells — something CONCATENATE and & can't do on their own.

Syntax

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

The second argument, ignore_empty, is what sets TEXTJOIN apart from older text-combining approaches: set it to TRUE and any blank cells in the range are skipped instead of leaving stray delimiters in the result (like a name with a double comma where a middle name would go). TEXTJOIN accepts a whole range as one argument, unlike CONCATENATE, which needs every cell listed individually.

Examples

=TEXTJOIN(", ",TRUE,A2:A6)

Joins five cells into a single comma-separated list, skipping any that are blank.

=TEXTJOIN("-",TRUE,B2,C2,D2)

Combines three individual cells with a dash between them — useful for building an ID or SKU from separate fields.

=TEXTJOIN(" ",TRUE,IF(A2:A10<>"","",A2:A10))

An array-style variant for edge cases where you need extra logic per cell before joining, entered with Ctrl+Shift+Enter in older Excel.

Paste your own TEXTJOIN formula and get a plain-English explanation, or describe what you need and let FormulaFixer write it for you.

Explain a TEXTJOIN formula →

More formulas