
π This article includes 1 downloadable practice file β
In this article
TEXTJOIN joins a range of text with a delimiter and can ignore empty cells.
Syntax
=TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)
| Argument | What it means |
|---|---|
delimiter |
Separator, e.g. “, “. |
ignore_empty |
TRUE to skip blanks. |
text1β¦ |
Cells or ranges. |
Examples
Example 1
=TEXTJOIN(", ", TRUE, A2:A10)
Comma-separated list of names.
Example 2
=TEXTJOIN(" ", TRUE, B2, C2, D2)
Address lines into one cell, no double spaces for blanks.
Power combo
=TEXTJOIN(", ", TRUE, FILTER(B2:B500, A2:A500=F2, ""))
All matching values in one cell (Excel 365).
TEXTJOIN in practice
Where you will use it
- Combine names with commas
- Join non-blank address parts
- Make lists for emails
Worked example
| Line 1 | Line 2 | City | Formula | Result |
|---|---|---|---|---|
| 12 MG Road | (blank) | Bengaluru | =TEXTJOIN(", ",TRUE,A2:C2) | 12 MG Road, Bengaluru |
| Flat 4 | Sector 18 | Noida | =TEXTJOIN(", ",TRUE,A3:C3) | Flat 4, Sector 18, Noida |
| Shop 7 | Main Bazar | (blank) | =TEXTJOIN(", ",TRUE,A4:C4) | Shop 7, Main Bazar |
Results calculated in Excel.
Mistakes people make
| Mistake | What to do instead |
|---|---|
| Blank parts leave ', ,' | Set ignore_empty to TRUE |
| Over 32,767 characters | #VALUE! |
Related functions
π Part of the free Excel course: Beginner β Expert Β· Try it in the Formula Lab or ask the AI Helper.
Test formulas dynamically in our web formula laboratory or download the companion Excel workbook.
π Practice files for this article
- πPractice workbook: Text & cleaning24 tasks on realistic sales data β type your formula, the Check column turns green when it is right. Answers sheet included.β¬ XLSX Β· 35 KB
Free to use for learning. Files with macros (.bas) are plain text β import them with Alt+F11 β File β Import File, and always test on a copy.
Atul (AJ) builds office-automation and local-first AI tools as Atulya AI, and works with Excel, SAP and Oracle EPM every day. He writes about the shortcuts, macros and automations that actually save time β plus the occasional wacky fact. Videos on YouTube: Lazy Automator AI (@LazyAutomatorAI).
More posts by Atul βBuild this skill next
This page is a quick function reference. Use it for syntax, then practise the function in a broader workflow.
Stuck on a step? Ask a question and the AI answers using this article.