TEXTJOIN vs CONCAT vs the ampersand

TEXTJOIN, CONCAT, and the & operator join text. They do not insert the same marks.

Maya, an empty cell, Jordan, and Priya are the list on the TEXTJOIN page. The delimiter is a comma and a space. TRUE skips the empty cell:

=TEXTJOIN(", ",TRUE,A1:A4)

The result is Maya, Jordan, Priya. FALSE keeps the empty cell, so the delimiter is written on both sides of it. The result is Maya, , Jordan, Priya.

TEXTJOIN
=TEXTJOIN(", ",TRUE,A1:A4)
=TEXTJOIN(", ",TRUE,A1:A4)B5
One blank in the list
AB
1Maya
2
3Jordan
4Priya
5Skip blanksMaya, Jordan, Priya
6Keep blanksMaya, , Jordan, Priya
A picture of the TEXTJOIN page. TRUE skips the empty cell, so the line is Maya, Jordan, Priya. FALSE keeps the empty cell, so the line is Maya, then a comma and a space, then another comma and a space, then Jordan, Priya.

TEXTJOIN can take the range A1:A4 as one argument. Excel 2016 does not have TEXTJOIN and returns #NAME?.

AustinTX78701, and the line with a comma

Austin, TX, and 78701 are the three cells on the CONCAT page. 78701 is text there. CONCAT adds nothing between the pieces:

=CONCAT(A1:C1)

The result is AustinTX78701. CLEAN of Austin, a line break, and TX is also AustinTX, on the imported-data page, because the line break was the only character between the words. CONCAT never had a separator to remove.

TEXTJOIN with the same comma-and-space delimiter puts that delimiter between every piece:

=TEXTJOIN(", ",TRUE,A1:C1)

The result is Austin, TX, 78701. There is a comma before the ZIP. The line on the CONCATENATE page is Austin, TX 78701, with a space before the ZIP and no comma there. One delimiter cannot write both marks. Pass them yourself:

=A1&", "&B1&" "&C1
=CONCATENATE(A1,", ",B1," ",C1)

Both return Austin, TX 78701.

CONCAT
=CONCAT(A1:C1)
=CONCAT(A1:C1)B2
Austin, TX, and 78701
ABC
1AustinTX78701
2CONCATAustinTX78701
3TEXTJOINAustin, TX, 78701
4AmpersandAustin, TX 78701
5CONCATENATEAustin, TX 78701
A picture of the CONCAT and CONCATENATE pages. CONCAT of the three cells is AustinTX78701. TEXTJOIN with a comma and a space is Austin, TX, 78701, which puts a comma before the ZIP. The line Austin, TX 78701 uses a comma after the city and a space before the ZIP.

CONCAT of a range needs Excel 2019 or later. Excel 2016 returns #NAME? for CONCAT. CONCATENATE of A1:C1 in that older Excel is #VALUE!. List the cells, or use &. Both of those are in Excel 2016.

A ZIP stored as the number 2134 joins as 2134. The text 02134 is the result on the leading-zero page, from TEXT with the format 00000. Join that text cell if the zero has to survive.


More from the blog