ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Text
  3. TEXTJOIN in Excel: Join a List and Skip Blanks

TEXTJOIN in Excel: Join a List and Skip Blanks

By ExcelReady Team·Updated November 1, 2026·7 min read

The short answer

To make TEXTJOIN ignore blanks, set its second argument to TRUE: =TEXTJOIN(", ",TRUE,A2:A7) joins the filled cells with a comma and space and skips the empty ones, so you never get double commas. With FALSE, empty cells are kept and leave gaps like "Excel, , SQL". TEXTJOIN needs Excel 2019 or later, or Microsoft 365.

Key takeaways

  • The shape is =TEXTJOIN(delimiter, ignore_empty, text1, ...).
  • TRUE as the second argument skips empty cells; FALSE keeps them and leaves extra delimiters.
  • Cells holding "" from a formula count as empty and are skipped; cells holding a space are not.
  • Join only matching rows with IF or FILTER inside TEXTJOIN.
  • TEXTJOIN needs Excel 2019, Excel 2021, Excel 2024 or Microsoft 365.
On this page+
  1. How does TEXTJOIN work?
  2. How to make TEXTJOIN ignore blank cells
  3. What counts as blank for TEXTJOIN?
  4. How to join with a different delimiter
  5. How to join only the cells that match a condition
  6. How to skip blanks without TEXTJOIN
  7. Common TEXTJOIN problems
  8. Practise it

TEXTJOIN can ignore blanks for you: set its second argument to TRUE and empty cells are skipped, so a list joins cleanly with no double commas. =TEXTJOIN(", ",TRUE,A2:A7) turns a column with gaps into Excel, SQL, Power BI, Python. This guide covers the syntax, how it treats different kinds of "empty", and how to join only the rows that match a condition.

How does TEXTJOIN work?#

TEXTJOIN joins a list of values and puts the same separator between each one. The separator is called the delimiter. The syntax has three parts:

Excel formula
=TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)
PartWhat it meansExample
delimiterWhat goes between items, in quotes", "
ignore_emptyTRUE to skip empty cells, FALSE to keep themTRUE
text1, text2...The cells, ranges or text to joinA2:A7

Unlike & or CONCAT, TEXTJOIN accepts a whole range at once. That makes it the easiest way to turn a column into one line. TEXTJOIN needs Excel 2019, Excel 2021, Excel 2024 or Microsoft 365. The comparison of CONCATENATE, CONCAT and TEXTJOIN shows how the three differ.

How to make TEXTJOIN ignore blank cells#

Put TRUE as the second argument. Here is a skills column with two empty rows:

A
1Skill
2Excel
3
4SQL
5Power BI
6
7Python

Compare the two settings:

FormulaResult
=TEXTJOIN(", ",TRUE,A2:A7)Excel, SQL, Power BI, Python
=TEXTJOIN(", ",FALSE,A2:A7)Excel, , SQL, Power BI, , Python

With FALSE, each empty cell still gets a delimiter on both sides, which leaves the , , gaps. In almost every real list you want TRUE.

FALSE is useful when the position matters, for example when you build a line for another system that expects a fixed number of fields, even empty ones.

What counts as blank for TEXTJOIN?#

TEXTJOIN skips truly empty cells and cells holding empty text, but not cells holding a space. This matters with real data:

Cell containsSkipped with TRUE?
Nothing at allYes
A formula returning ""Yes
A single space " "No
The number 0No

The space is the usual reason a "blank" cell still adds a comma. You can't see it, but Excel can. In Microsoft 365, trim the range inside TEXTJOIN:

Excel formula
=TEXTJOIN(", ",TRUE,TRIM(A2:A7))

TRIM turns a space-only cell into empty text, which TEXTJOIN then skips. In Excel 2019, enter that formula with Ctrl+Shift+Enter (Mac: Control+Shift+Return) so it works on the whole range.

How to join with a different delimiter#

The delimiter can be any text, and choosing it well makes the result easier to read. Some common choices:

DelimiterFormulaUse for
Comma and space=TEXTJOIN(", ",TRUE,A2:A7)Readable lists
Semicolon=TEXTJOIN(";",TRUE,A2:A7)Email address lists
Space=TEXTJOIN(" ",TRUE,A2:C2)First, middle, last name
Line break=TEXTJOIN(CHAR(10),TRUE,A2:A4)Address on several lines

The space version is great for names where the middle name is often missing. =TEXTJOIN(" ",TRUE,A2:C2) gives Maria Lopez instead of Maria Lopez with two spaces. For other ways to do this, see joining text with a space.

For the line-break version, turn on Wrap Text in the cell so each part appears on its own line. On Excel for Mac, CHAR(10) also works for a line break.

How to join only the cells that match a condition#

Put IF inside TEXTJOIN to blank out the rows you don't want, then let TRUE skip them. Say A2:A8 holds names and B2:B8 says whether each person passed:

Excel formula
=TEXTJOIN(", ",TRUE,IF(B2:B8="Yes",A2:A8,""))

IF returns the name where B is Yes and "" everywhere else. TEXTJOIN then joins the names and skips the empty text. In Microsoft 365 this works as a normal formula. In Excel 2019, confirm it with Ctrl+Shift+Enter.

In Excel 2021 or Microsoft 365, FILTER reads more clearly:

Excel formula
=TEXTJOIN(", ",TRUE,FILTER(A2:A8,B2:B8="Yes"))

Add UNIQUE to drop repeated values: =TEXTJOIN(", ",TRUE,UNIQUE(A2:A8)) lists each name once.

One thing to watch with FILTER: if no row matches, FILTER returns #CALC! and TEXTJOIN passes the error on. Give FILTER its third argument so it returns empty text instead: FILTER(A2:A8,B2:B8="Yes",""). TEXTJOIN then returns an empty cell rather than an error.

How to skip blanks without TEXTJOIN#

In Excel 2016 or earlier, there is no TEXTJOIN, so you must handle each empty cell yourself. The usual way is an IF around every part:

Excel formula
=A2&IF(B2="",""," "&B2)&IF(C2="",""," "&C2)

Each IF adds a space and the cell only when the cell has something in it. This works for two or three cells, such as first, middle and last names. For a long column it becomes hard to read and easy to break, which is exactly the problem TEXTJOIN solves. If your files must open in old versions, keep lists short or join them in a helper column, one row at a time.

Common TEXTJOIN problems#

Most TEXTJOIN problems come from version support, hidden characters or numbers. Check these:

  1. #NAME? Your Excel is older than 2019, so it doesn't know TEXTJOIN. Use & or CONCATENATE instead. The comparison of & and CONCATENATE shows both.
  2. Extra delimiters. The second argument is FALSE, or some cells hold spaces. Use TRUE and TRIM.
  3. Dates show as numbers. TEXTJOIN joins a date's serial number. Wrap it: TEXT(B2,"d mmm yyyy").
  4. #VALUE! The result is longer than 32,767 characters, the most one cell can hold.
  5. Zeros appear. A 0 isn't empty. If a formula shows 0 for "nothing", change it to return "" instead.

Practise it#

TEXTJOIN with TRUE is one of the quickest wins in Excel, and it's easy to remember once you've typed it a few times. Practise joining text with &, CONCAT and TEXTJOIN in a live spreadsheet: you write the formula and it checks your answer instantly. The TEXTJOIN function guide is a handy syntax reference, and the guide to combining text from several cells covers the other joining methods.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Join the skills in A2:A7 into one line separated by a comma and a space, skipping the empty cells. Click C2 and use TEXTJOIN with TRUE as the second argument.

fx
ABCD
1
Skill
Skill list
2
Excel
3
4
SQL
5
Power BI
6
7
Python
8
9
10

Tip: The delimiter comes first in quotes (a comma and a space), then TRUE, then the range.

Practise this in a lesson

LessonJoining text: &, CONCAT and TEXTJOINBuild full names, addresses and tag lists by joining text with &, CONCAT and TEXTJOIN.Function guideTEXTJOINJoin cells with commas, spaces or semicolons using TEXTJOIN, and skip blanks automatically. Examples, pitfalls and a live exercise.

Frequently asked questions

How do I make TEXTJOIN ignore blank cells?

+

Set the second argument to TRUE, as in =TEXTJOIN(", ",TRUE,A2:A10). Empty cells, and cells where a formula returns "", are then skipped.

Why does TEXTJOIN still show extra commas?

+

Either the second argument is FALSE, or the cells that look empty contain a space or other invisible character. Use =TEXTJOIN(", ",TRUE,TRIM(A2:A10)) in Microsoft 365 to turn space-only cells into empty text first.

What is the difference between TEXTJOIN and CONCAT?

+

TEXTJOIN puts a delimiter between items and can skip empty cells. CONCAT just joins everything with nothing in between, so you must add separators yourself.

How do I join cells based on a condition?

+

Put IF inside TEXTJOIN: =TEXTJOIN(", ",TRUE,IF(B2:B8="Yes",A2:A8,"")). In Excel 2021 or Microsoft 365, FILTER also works: =TEXTJOIN(", ",TRUE,FILTER(A2:A8,B2:B8="Yes")).

Is TEXTJOIN available in Excel 2016?

+

No. TEXTJOIN arrived in Excel 2019 and Microsoft 365. In Excel 2016 you need & or CONCATENATE, and you have to handle empty cells yourself.

Sources

  • TEXTJOIN function - Microsoft Support
  • CONCAT function - Microsoft Support
  • FILTER function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 1, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. How does TEXTJOIN work?
  2. How to make TEXTJOIN ignore blank cells
  3. What counts as blank for TEXTJOIN?
  4. How to join with a different delimiter
  5. How to join only the cells that match a condition
  6. How to skip blanks without TEXTJOIN
  7. Common TEXTJOIN problems
  8. Practise it

Keep reading

Comparisons· 7 min read

CONCATENATE vs CONCAT vs TEXTJOIN vs &

Use & or CONCAT to join a few pieces of text, and TEXTJOIN when every piece gets the same separator or some cells may be empty. TEXTJOIN adds the separator for you and can skip blanks. CONCATENATE is the older version of CONCAT, kept for compatibility. CONCAT and TEXTJOIN need Excel 2019 or later.

Text· 7 min read

How to Combine Text in Excel (&, CONCAT, TEXTJOIN)

To combine text in Excel, join the pieces with &: =A2&" "&B2 turns Nora and Delgado into Nora Delgado. CONCAT does the same with a list of pieces. TEXTJOIN puts the same separator between every piece and can skip empty cells: =TEXTJOIN(", ",TRUE,C2:E2). Type spaces and commas yourself, inside double quotes.

Text· 6 min read

REPT in Excel: Simple In-Cell Bar Charts

REPT repeats text a number of times: =REPT("|",5) returns |||||. To draw an in-cell bar chart, repeat a character in proportion to each value, such as =REPT("|",B2/1000) for one bar per 1,000. Scale long bars with =REPT("|",ROUND(B2/MAX($B$2:$B$7)*20,0)) so the largest value gets 20 characters.

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free