Excel function

TEXTJOINfunction

Joins text from several cells with a delimiter between them.

Excel 2019+
=TEXTJOIN(", ", TRUE, C2:C5)
A
B
C
1
2
3
4
5

Result (delimiter ", ")14 chars

1S
2a
3l
4e
5s
6,
7·
8D
9e
10v
11,
12·
13H
14R

Drag the corner dots to change text1. Set ignore_empty to FALSE and the delimiter appears twice where C3 is blank. Try breaking it on purpose to see the errors.

Result

Sales, Dev, HR

delimiter

The characters to put between texts. Leave it empty to just join them.

ignore_empty

TRUE skips blank cells; FALSE adds a delimiter for blank cells too.

text1
C2:C5Drag the corner dots on the table

The range of cells to join, read row by row from the top left.

What is the TEXTJOIN function?

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

TEXTJOIN joins text from several cells and puts a delimiter such as a comma or space between them. Use it to list items in one cell, like "Sales, Dev, HR".

With ignore_empty TRUE, blank cells are skipped; with FALSE, they get a delimiter too, giving ", ,". C3 above is blank, so switch between the two and compare the result row.

Arguments

delimiter
The characters to put between texts. "" (empty text) just joins them.
ignore_empty
TRUE skips blank cells. FALSE treats a blank cell as a value and adds a delimiter.
text1, ...
The text, cells or ranges to join.

TEXTJOIN examples

  1. Example 1. A list of departments

    =TEXTJOIN(", ", TRUE, C2:C5)

    Skips the blank C3: "Sales, Dev, HR".

  2. Example 2. Keep a place for blanks

    =TEXTJOIN(", ", FALSE, C2:C5)

    "Sales, , Dev, HR".

  3. Example 3. Name and department with spaces

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

    "Smith Liam Sales".

Common mistakes

FAQ

How is it different from CONCAT?
CONCAT has no delimiter or ignore_empty arguments.
What if the delimiter is empty?
It joins like CONCAT, but the ignore_empty setting still applies.