<< Click to Display Table of Contents >> TEXTJOIN (concatenate strings with separators) |
Syntax:
TEXTJOIN(Separator, IgnoreEmptyCells, String1 [, String2 ...])
Description:
This 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, while FALSE also concatenates empty cells.
String1, String2 etc., are the cells with text strings to be connected.
Example:
In the figure below, column G shows the result for the following formulas:
In row2, the formula is TEXTJOIN(",", TRUE, A2:E2)
In row3 (with an empty cell B3), the formula is TEXTJOIN(",", TRUE, A3:E3)
In row4 (with an empty cell B4), the formula is TEXTJOIN(",", FALSE, A4:E4)
Compatibility notes:
Microsoft Excel supports this function only in version 2019 or later. The function is unknown in older versions.
See also: