Join Values, Skipping Blanks (TEXTJOIN)

Excel Formulas › Data Cleaning

2019+TEXTJOIN

Combine a row of values into one delimited string — an address, a tag list — without stray delimiters where cells are empty. TEXTJOIN with ignore-empty set to TRUE handles the gaps.


Quick formula: join with commas, skipping blanks:
=TEXTJOIN(", ", TRUE, range)
A delimiter, TRUE to skip empty cells, then the range — no double commas around blanks.

Functions used (tap for the full reference guide):

The example

City, "", State, Zip → clean line.

AB
1PartsJoined
2Dallas, , TX, 75201Dallas, TX, 75201

The formula

The formula:

=TEXTJOIN(", ", TRUE, A2:D2) // delimiter, ignore-empty, range

How it works

How it works:

  1. TEXTJOIN(delimiter, ignore_empty, range) joins values with your separator.
  2. Set ignore_empty to TRUE so blank cells don’t leave “, ,” gaps.
  3. It accepts ranges directly — no need to list each cell like CONCATENATE.
  4. Available from Excel 2019/365; older versions need the CONCATENATE + IF workaround.

TEXTJOIN beats CONCATENATE for messy data. CONCATENATE (or &) blindly includes every cell, so an empty middle field leaves a doubled delimiter you then have to clean up. TEXTJOIN with ignore-empty handles optional fields — address line 2, a middle name, a missing tag — in one formula, which is exactly what real-world data needs.

Try it: interactive demo

Live demo

Comma-separated parts (leave gaps with empty items).

Joined:

Variations

Include blanks

Keep gaps:

=TEXTJOIN(", ", FALSE, range)

Conditional join

Only matching rows (365):

=TEXTJOIN(", ", TRUE, IF(flag="Y", names, ""))

Pre-2019 fallback

No TEXTJOIN:

=TRIM(A2&" "&B2&" "&C2)

Pitfalls & errors

TRUE skips blanks. Set ignore_empty to TRUE or you get doubled delimiters.

2019+ only. Older Excel lacks TEXTJOIN — use the CONCATENATE workaround.

Spaces aren’t blank. A cell with a space is joined — TRIM or clean first.

Practice workbook

📊
Download the free Join Values, Skipping Blanks (TEXTJOIN) practice workbook
A TEXTJOIN sheet with the include-blanks, conditional, and fallback variants, plus 4 challenges with answers. No sign-up required.

Frequently asked questions

How do I join cells and skip blanks in Excel?
Use =TEXTJOIN(", ", TRUE, range) — the TRUE ignores empty cells so there are no doubled delimiters.
How is TEXTJOIN better than CONCATENATE?
It takes a range directly and can skip blanks, so optional fields don't leave stray delimiters.
What if I don't have TEXTJOIN?
It needs Excel 2019/365. In older versions, concatenate with & and clean up gaps, or wrap pieces in IF.

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related formulas: Concatenate range · Join text · Normalize match key

Function references: TEXTJOIN