TEXTJOIN in Excel: examples and practice

TEXTJOIN joins many texts into one text and puts a separator between them. For example, =TEXTJOIN(", ",TRUE,B2:B5) gives Nuts, Milk, Eggs and skips the empty cell.

Syntax

=TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)
delimiter
The separator in quotes, for example ", " or " ".
ignore_empty
TRUE skips empty cells. FALSE keeps them, so you get two separators next to each other.
text1, text2, ...
The texts, cells or ranges to join.

Examples

Example data

AB
1GuestAllergy
2AnnNuts
3Ben
4CleoMilk
5DevEggs
FormulaResultWhat it does
=TEXTJOIN(", ",TRUE,B2:B5)Nuts, Milk, EggsJoins all allergies with a comma and a space. TRUE skips the empty cell of Ben.
=TEXTJOIN(", ",FALSE,B2:B5)Nuts, , Milk, EggsWith FALSE, the empty cell stays. You see two commas.
=TEXTJOIN(": ",TRUE,A2,B2)Ann: NutsJoins two single cells. The separator can be any text.

Try it

In cell D2, join all guest names from A2 to A5. Use a comma and a space as the separator.

Show the solution

=TEXTJOIN(", ",TRUE,A2:A5) → Ann, Ben, Cleo, Dev

Common mistakes

Separator without quotes

=TEXTJOIN(,,TRUE,B2:B5) does not work as you expect. Write the separator in quotes: ", ".

No space after the comma

"," gives Nuts,Milk,Eggs. For a readable list, use ", " with a space.

Dana Novak, manages the office at Copperleaf Dental

Practice this in a story

A short lesson from a real job. We show you each step, then you do it yourself.

Full names and labels · Module 8 · Text · 5 min

The names are clean now. Dana prints the reminder letters. Each letter needs the full name and an address label. But first name, last name, street and city are in different columns. Some patients have an apartment number, some do not.

Practice this in a story

More lessons with TEXTJOIN

Related functions