
The TEXTJOIN function in Excel joins text from many cells into one, with a separator you choose and the option to skip empty cells. It saves you from long formulas full of ampersands. This guide shows how to use it with made-up data, how to join with conditions and what to do if your version does not have it.

TEXTJOIN syntax
TEXTJOIN takes a separator, a TRUE or FALSE for skipping blanks, and the cells to join:
=TEXTJOIN(", ", TRUE, A2:A6)
If A2 to A6 hold five city names, this puts them in one cell separated by a comma and a space. The TRUE means empty cells are ignored.
Why TEXTJOIN beats the ampersand
Joining with the ampersand needs you to name every cell and add the separator each time: =A2&", "&A3&", "&A4. If one cell is empty, you get an extra comma. TEXTJOIN handles ranges and blanks for you.

Join first name and last name
=TEXTJOIN(" ", TRUE, A2, B2)
With "Sara" in A2 and "Ali" in B2, the result is "Sara Ali". If B2 is empty, you get "Sara" with no stray space.
Put each item on a new line
Use the line break character as the separator:
=TEXTJOIN(CHAR(10), TRUE, A2:A6)
Turn on Wrap Text for the cell so the line breaks show.

TEXTJOIN with a condition
To join only the names where column B says Open, combine it with IF. In current Excel versions, this works as a normal formula:
=TEXTJOIN(", ", TRUE, IF(B2:B6="Open", A2:A6, ""))
In older versions, you may need to confirm it with Ctrl+Shift+Enter. Test the result on a few rows.
What if my Excel has no TEXTJOIN?
TEXTJOIN was added in newer versions of Excel, so older ones show a #NAME? error. Check your version's help page. In older versions, use CONCATENATE or the ampersand instead. In Google Sheets, TEXTJOIN is also available.

Common TEXTJOIN mistakes
- Separator without quotes. Write ", " in quotes.
- Blanks not skipped. Set the second argument to TRUE.
- #NAME? error. Your Excel version may not have the function.
- Result too long. A cell has a character limit, so very long joins can be cut off or show an error.
TEXTJOIN in Excel: common questions
What is the difference between TEXTJOIN and CONCAT?
CONCAT joins text with no separator. TEXTJOIN adds a separator and can skip blanks.
Can TEXTJOIN join numbers?
Yes. Numbers are joined as text. Format them first if you need a certain look, using the TEXT function.
Can I reverse it?
Yes. In Excel, the Text to Columns tool splits the text again. In Google Sheets, use the SPLIT function.
