How to Use TEXTJOIN in Excel: Syntax, Examples, and Tips
Use the
TEXTJOIN function in Excel to combine text from multiple cells or ranges with a specified delimiter. The syntax is TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...), where you choose a separator and decide whether to skip empty cells.Syntax
The TEXTJOIN function combines text from multiple cells or ranges using a delimiter you specify.
- delimiter: The character(s) to put between each text item, like a comma or space.
- ignore_empty: TRUE to skip empty cells, FALSE to include them.
- text1, text2, ...: The text items or ranges you want to join.
excel
TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)
Example
This example joins the names in cells A1 to A4 with a comma and space, ignoring empty cells.
excel
=TEXTJOIN(", ", TRUE, A1:A4)Output
John, Mary, Alex
Common Pitfalls
Common mistakes include:
- Not setting
ignore_emptyto TRUE, which adds extra delimiters for empty cells. - Using a delimiter that is missing or incorrect.
- Trying to join non-text values without converting them.
Example of wrong and right usage:
excel
=TEXTJOIN(",", FALSE, "Apple", "", "Banana") =TEXTJOIN(",", TRUE, "Apple", "", "Banana")
Output
Apple,,Banana
Apple,Banana
Quick Reference
| Parameter | Description | Example |
|---|---|---|
| delimiter | Text to insert between joined items | ", " (comma and space) |
| ignore_empty | Skip empty cells if TRUE | TRUE or FALSE |
| text1, text2, ... | Cells or text to join | A1:A4, "Hello", B2 |
Key Takeaways
TEXTJOIN combines text from multiple cells with a chosen delimiter.
Set ignore_empty to TRUE to avoid extra delimiters from blank cells.
You can join ranges and individual text items together.
Use a clear delimiter like comma, space, or dash for readability.
TEXTJOIN works well for creating lists or merging text data easily.