What Most People Miss About How TEXTJOIN Works in Excel

TEXTJOIN combines text from multiple cells with a custom separator. But if you don’t control empty-cell behavior, you’ll get double commas, trailing delimiters, or broken addresses — especially with messy supplier data.

The Setup

You’re cleaning a vendor contact list exported from office.alibaba.com. It has inconsistent formatting: some rows missing phone numbers, others with blank departments, and email fields sometimes empty. You need one clean contact string per row — no extra commas, no spaces before/after separators.

ABCDE
Sarah ChenAcme CorpSales+86 21 5551 0293sarah@acmecorp.cn
James LeeBrightLine Tech+86 755 8882 4001james@brightline.tech
Maya RodriguezZephyr Trading LtdProcurementmaya@zephyrtrading.co
Kenji TanakaSumi ElectronicsEngineering+86 20 3338 7777
Priya MehtaNexaLogistics GroupOperations+86 571 2889 6655priya@nexalogistics.cn
Tariq Al-FarsiGulfStream Sourcingtariq@gulfstreamsourcing.ae
Anya PetrovaVostok ComponentsQuality Assurance+86 451 8221 9999anya@vostokcomp.ru
Diego MoralesAndino TextilesDesigndiego@andinotextiles.pe

The Challenge

You need to merge columns A–E into one field like this: Sarah Chen, Acme Corp, Sales, +86 21 5551 0293, sarah@acmecorp.cn. But raw CONCATENATE gives you A1&", "&B1&", "&C1&", "&D1&", "&E1 — and that explodes when C1 or D1 is blank. You get Sarah Chen, Acme Corp, , +86 21 5551 0293, sarah@acmecorp.cn. That comma after "Corp" is garbage. And you can’t just delete blanks manually — there are 427 rows.

Also: some vendors use “&” in company names (e.g., “Ming & Li Co”). If you try SUBSTITUTE on the final string later, you’ll break those.

Walking Through It

Start in F1. Type =TEXTJOIN(", ",TRUE,A1:E1).

The first argument is the delimiter — here, a comma + space. The second is TRUE, meaning “ignore empty cells.” The third is the range — A1 through E1.

Press Ctrl+Enter to confirm (not Enter — that would auto-fill down; Ctrl+Enter keeps focus in F1).

Now drag F1 down to F8. Or better: select F1:F8, type the formula, then press Ctrl+Enter — Excel fills all selected cells at once. That’s faster than dragging.

Here’s what changes:

Before (A1:E1)After (F1)
Sarah Chen | Acme Corp | Sales | +86 21 5551 0293 | sarah@acmecorp.cnSarah Chen, Acme Corp, Sales, +86 21 5551 0293, sarah@acmecorp.cn
James Lee | BrightLine Tech | [blank] | +86 755 8882 4001 | james@brightline.techJames Lee, BrightLine Tech, +86 755 8882 4001, james@brightline.tech
Maya Rodriguez | Zephyr Trading Ltd | Procurement | [blank] | maya@zephyrtrading.coMaya Rodriguez, Zephyr Trading Ltd, Procurement, maya@zephyrtrading.co
Kenji Tanaka | Sumi Electronics | Engineering | +86 20 3338 7777 | [blank]Kenji Tanaka, Sumi Electronics, Engineering, +86 20 3338 7777

Notice: no double commas. No trailing comma. No space before the comma. TEXTJOIN skips blanks *before* inserting delimiters — not after.

Counterintuitive tip: If you want a line break instead of comma, use CHAR(10) as the delimiter — but only if you’ve enabled Wrap Text on the output column (Alt + H + W). Otherwise it’ll look like one long line.

The Result

Final output in column F — clean, consistent, ready for import into CRM or email merge:

F1:F8
Sarah Chen, Acme Corp, Sales, +86 21 5551 0293, sarah@acmecorp.cn
James Lee, BrightLine Tech, +86 755 8882 4001, james@brightline.tech
Maya Rodriguez, Zephyr Trading Ltd, Procurement, maya@zephyrtrading.co
Kenji Tanaka, Sumi Electronics, Engineering, +86 20 3338 7777
Priya Mehta, NexaLogistics Group, Operations, +86 571 2889 6655, priya@nexalogistics.cn
Tariq Al-Farsi, GulfStream Sourcing, tariq@gulfstreamsourcing.ae
Anya Petrova, Vostok Components, Quality Assurance, +86 451 8221 9999, anya@vostokcomp.ru
Diego Morales, Andino Textiles, Design, diego@andinotextiles.pe

What Could Go Wrong

Mistake #1: Using FALSE instead of TRUE for the second argument
Formula becomes =TEXTJOIN(", ",FALSE,A1:E1). Result: Sarah Chen, Acme Corp, Sales, +86 21 5551 0293, sarah@acmecorp.cn — fine here. But for James Lee: James Lee, BrightLine Tech, , +86 755 8882 4001, james@brightline.tech. That middle comma is now hardcoded. You’ll spend 20 minutes hunting it.

Mistake #2: Forgetting to lock the range when copying across columns
If you type =TEXTJOIN(", ",TRUE,A1:E1) in F1, then copy to G1, Excel shifts the range to B1:F1 — pulling in garbage or #REF! errors. Fix: Use absolute refs like $A1:$E1 if copying right. Or better — don’t copy right. TEXTJOIN is vertical by design.

Mistake #3: Putting quotes around the delimiter when it’s already a string
You write =TEXTJOIN(", ",TRUE,A1:E1) — correct. But if you accidentally type =TEXTJOIN("\", \"",TRUE,A1:E1), Excel treats "\", \"" as literal backslash-comma-space-backslash — so output becomes Sarah Chen\, \Acme Corp\, \Sales.... It’s valid syntax. Just useless.

Next step: Try this on your own sheet. Select F1:F10, type =TEXTJOIN(", ",TRUE,A1:E1), then press Ctrl+Enter. Done.

Michael Lee

Michael Lee

Michael covers the latest in office software updates