How to Use Excel TEXTJOIN to Combine Data Without Messy Formulas

The Concatenation Headache

One of the most common data manipulation tasks in Excel is combining text from multiple different cells into a single cell. For decades, the standard way to do this was using the CONCATENATE formula (or the ampersand & symbol).

Imagine you have a list of employee email addresses in cells A1 through A5. Your boss asks you to put them all into a single cell, separated by commas, so they can easily copy and paste the list into an Outlook email field.

Using the old method, your formula looks like this:

=A1 & "," & A2 & "," & A3 & "," & A4 & "," & A5

This is incredibly tedious to type. But the real nightmare occurs when your data is imperfect. What if the employee in cell A3 left the company, so cell A3 is completely blank? The old formula blindly smashes the data together anyway, resulting in a formatting disaster: email1,email2,,email4,email5. You are left with two commas next to each other, which will break your email client.

Microsoft recognized this massive flaw and introduced a modern, vastly superior formula called TEXTJOIN. It eliminates the manual typing and intelligently ignores blank cells.

The Anatomy of TEXTJOIN

The TEXTJOIN function asks you three simple questions before it combines your data.

Syntax: =TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)

1. The Delimiter (The Glue)

The first thing Excel needs to know is what character you want to put between the pieces of text. In our email example, we want a comma.

You must enclose the delimiter in quotation marks. Type: =TEXTJOIN(",",

(Pro tip: If you want a comma and a space to make it look clean, type ", ")

2. Ignore Empty (The Blank Cell Fix)

This is the killer feature. The second argument asks a simple True or False question: “If I find a blank cell in your data, should I ignore it?”

You almost always want to say True. This ensures you never end up with double commas or weird formatting gaps.

Type: =TEXTJOIN(",", TRUE,

3. The Text (The Data Range)

The final step is telling Excel which cells to combine. With the old method, you had to click every single cell individually (A1, A2, A3). With TEXTJOIN, you can simply highlight a massive range of cells in one go.

If your emails are in A1 through A100, you simply type A1:A100.

The final, unbreakable formula is: =TEXTJOIN(",", TRUE, A1:A100)

Advanced Use Cases

Because TEXTJOIN allows you to define the delimiter, it is incredibly versatile for reformatting data for other software systems.

Creating Search Strings

If you have a list of ten specific part numbers in Column A, and you need to search a massive database for “Part 1 OR Part 2 OR Part 3”, you can use TEXTJOIN to build the search query instantly.

Formula: =TEXTJOIN(" OR ", TRUE, A1:A10)

Result: Part1 OR Part2 OR Part3...

Formatting Names

If you have a First Name in A1 (John), a Middle Initial in B1 (D), and a Last Name in C1 (Smith), you can combine them with a space as the delimiter.

Formula: =TEXTJOIN(" ", TRUE, A1:C1)

Crucially, if someone doesn’t have a middle initial (B1 is blank), the TRUE argument ensures the result is a clean “John Smith” without an awkward double space in the middle.

If you are still using CONCATENATE or the ampersand symbol to combine more than two cells of data, you are working too hard and exposing your spreadsheets to formatting errors. TEXTJOIN is a massive quality-of-life upgrade that cleanly and intelligently binds massive amounts of data together with a single, elegant formula.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.