TEXTJOIN (concatenate strings with separators)

<< Click to Display Table of Contents >>

TEXTJOIN (concatenate strings with separators)

Syntax:

TEXTJOIN(Separator, IgnoreEmptyCells, String1 [, String2 ...])

Description:

Combines two or more text strings into one text string. Unlike the CONCAT function, you can use TEXTJOIN to specify separators between text strings. You can also specify whether empty cells should be ignored.

Separator is the desired separator between text strings. If omitted, no separator is used.

IgnoreEmptyCells determines whether empty cells should be ignored. TRUE or omitted ignores empty cells, FALSE also concatenates empty cells.

String1, String2 etc. are the cells with text strings to be connected.

Example:

In the figure below, line G shows the result for the following formulas:

In row2 the formula is TEXTJOIN(",", TRUE, A2:E2)

In row3 (with an empty cell) the formula is TEXTJOIN(",", TRUE, A3:E3)

In row4 (with an empty cell) the formula is TEXTJOIN(",", FALSE, A4:E4)

textjoin_sample

Compatibility notes:

Microsoft Excel supports this function only in version 2019 or later. In older versions, the function is unknown.

See also:

CONCAT, CONCATENATE