TEXTJOIN joins text with a separator between each piece, and its syntax is =TEXTJOIN(delimiter, ignore_empty, text1, [text2, ...]). The delimiter comes first and the pieces come last, so =TEXTJOIN(", ", TRUE, B4:B6) joins that range with a comma and a space, and the TRUE skips any blank cells instead of leaving a stray comma behind.
TEXTJOIN in Google Sheets: Join Text Without the Stray Commas
How to use TEXTJOIN in Google Sheets. Delimiter first, TRUE to skip blanks, then the pieces. Join a whole column into one cell and avoid double delimiters.
Sheets Bootcamp
July 21, 2026
Table of Contents
Quick Answer
TEXTJOIN is the one text-joining function in Google Sheets that knows what to do about blanks. The text functions pillar covers the whole toolkit, and the CONCATENATE and TEXTJOIN guide compares the three ways to glue text together. This guide is about TEXTJOIN on its own: the argument order, the ignore_empty switch that causes most of the trouble, and the patterns that only work because TEXTJOIN accepts a range.
In This Guide
- TEXTJOIN Syntax
- Why the Delimiter Comes First
- ignore_empty: The Argument That Matters Most
- Join a Whole Column Into One Cell
- Build It Step-by-Step
- Practical Examples
- Common Errors and How to Fix Them
- When to Use & Instead
- Tips and Best Practices
- Related Google Sheets Tutorials
- Frequently Asked Questions
TEXTJOIN Syntax
=TEXTJOIN(delimiter, ignore_empty, text1, [text2, ...]) | Argument | Description | Required |
|---|---|---|
| delimiter | The text placed between each piece, in quotes. Use ", " for a comma and a space, " " for a space, "" for nothing at all | Yes |
| ignore_empty | TRUE skips empty cells, FALSE includes them | Yes |
| text1 | The first piece: a cell, a range, or a text string in quotes | Yes |
| text2, โฆ | Any number of further pieces or ranges | No |
Example: =TEXTJOIN(", ", TRUE, "12 Main St", "", "Riverside") returns "12 Main St, Riverside". The empty string in the middle is skipped, so only one comma appears in the result.
Why the Delimiter Comes First
Most functions take their data first. TEXTJOIN does not, and it trips people up on the first attempt.
The reason is the open-ended list at the end. TEXTJOIN accepts as many pieces as you want to give it, so anything placed after that list could not be distinguished from another piece. The delimiter and the ignore_empty switch have to sit in front for the list to stay open. SUMIFS puts its sum range first for the same reason.
Read the argument order as a sentence: what goes between, whether to skip blanks, then the stuff.
Tip
If you keep writing the arguments in the wrong order, type the function name and let the Sheets autocomplete tooltip stay open while you fill it in. It bolds the argument you are currently typing, which makes the delimiter-first order obvious.
ignore_empty: The Argument That Matters Most
This is the whole reason TEXTJOIN exists, and it is where nearly every TEXTJOIN question comes from.
Take a customer record where the fields live in separate cells: Street in B4, Unit in B5 and City in B6. The Unit is empty, because this customer lives in a house.
| Cell | Field | Value |
|---|---|---|
| B4 | Street | 12 Main St |
| B5 | Unit | (empty) |
| B6 | City | Riverside |
With TRUE, the blank disappears and takes its delimiter with it:
=TEXTJOIN(", ", TRUE, B4, B5, B6) That returns "12 Main St, Riverside". One comma, exactly where you want it.
With FALSE, the blank is treated as a real piece, so it gets a delimiter on both sides:
=TEXTJOIN(", ", FALSE, B4, B5, B6) That returns "12 Main St, , Riverside". The glue is still there even though the piece is not.
Important
Gluing the same fields by hand produces the identical mess. =B4&", "&B5&", "&B6 has no way to know that B5 is empty, so it leaves both commas in place. Any method other than TEXTJOIN with TRUE has this problem, which is exactly what TEXTJOIN was added to solve.
Set ignore_empty to TRUE unless you have a specific reason not to. The main reason to use FALSE is a fixed-width output where every position has to line up, such as a delimited file that a downstream system parses by column position.
Join a Whole Column Into One Cell
TEXTJOIN accepts ranges, and this is the thing it does that the & operator cannot do at all.
=TEXTJOIN(", ", TRUE, A2:A50) That collapses 49 rows into a single cell, comma separated, with blank rows skipped. The formula does not change as the list grows, which matters when the data comes from an import or a form.
TEXTJOIN also reads a two-dimensional range. It works across each row first, then moves down to the next one, so =TEXTJOIN(" | ", TRUE, A2:C4) returns the nine values in reading order rather than column by column.
Note
A single Google Sheets cell holds up to 50,000 characters. Joining a very long column can bump into that ceiling, and it is worth remembering before you point TEXTJOIN at a range of several thousand rows.
Build It Step-by-Step
Set up the fields you want to join
Put each piece in its own cell. This example uses a customer record split across five fields, with First in B2, Last in B3, Street in B4, Unit in B5 and City in B6. Leave the Unit cell empty on purpose. A missing field is the situation TEXTJOIN is built for, and testing with one present tells you nothing.
Write TEXTJOIN with the delimiter first
Select an empty cell and enter:
=TEXTJOIN(", ", TRUE, B4, B5, B6) The first argument is what goes between the pieces. The second is whether to skip empty cells. Everything after that is the content.
Read the result and check for gaps
The formula returns "12 Main St, Riverside". The empty Unit was skipped entirely, so there is one comma rather than two.
Change the TRUE to FALSE and the same formula returns "12 Main St, , Riverside". Flipping it back and forth once is the fastest way to understand what that argument actually does.
Swap the cell list for a range
Replace the individual references with a range:
=TEXTJOIN(", ", TRUE, B4:B6) Same answer, shorter formula. More usefully, the formula no longer needs editing when the number of fields changes. Add a Country row inside the range and it joins automatically.
Practical Examples
Example 1: A Mailing Address on Separate Lines
Use CHAR(10), the newline character, as the delimiter to stack the pieces inside one cell.
=TEXTJOIN(CHAR(10), TRUE, B2&" "&B3, B4, B5, B6) This puts the full name on the first line, then the street, then the unit if there is one, then the city. Turn on wrapping with Format > Wrapping > Wrap or the line breaks will not display.
Example 2: A Deduplicated Tag List
Nest UNIQUE inside TEXTJOIN to join each distinct value once.
=TEXTJOIN(", ", TRUE, UNIQUE(D2:D200)) If the tag column repeats โCoffeeโ forty times, the output still lists it once. UNIQUE returns a range, and TEXTJOIN joins ranges, so the two compose without a helper column.
Example 3: Only the Rows That Match
Nest FILTER to join a subset instead of everything.
=TEXTJOIN(", ", TRUE, FILTER(A2:A200, B2:B200="Riverside")) That returns a comma separated list of just the Riverside names. It is a readable one-cell answer to a question that would otherwise need a filtered view.
Example 4: Money and Dates That Keep Their Formatting
TEXTJOIN converts values to plain text, which strips the display format. Wrap each one in TEXT to control how it reads.
=TEXTJOIN(" on ", TRUE, TEXT(F2, "$#,##0.00"), TEXT(A2, "MMM D, YYYY")) That returns something like "$1,250.00 on Mar 16, 2026" instead of "1250 on 46097".
Common Errors and How to Fix Them
Double Delimiters in the Output
If the result reads "12 Main St, , Riverside", the second argument is FALSE. Change it to TRUE and the empty cell stops contributing a delimiter. This is the most common TEXTJOIN problem by a wide margin, and the fix is always that one argument.
Numbers Come Out Unformatted
A cell displaying $1,250.00 joins as 1250, and a date displaying 2026-03-16 joins as 46097. That serial number is not a bug. Dates in Google Sheets are numbers wearing a date format, and joining them as text drops the costume. Wrap them in TEXT with an explicit format string.
The Result Cannot Be Used in Math
TEXTJOIN always returns text, even when every piece was a number. =TEXTJOIN("", TRUE, A2, B2)*2 fails because the result is a string. If you want arithmetic, do the arithmetic first and join afterwards.
The Delimiter Appears Inside a Value
If one of your source cells already contains a comma, the output has commas that did not come from the delimiter, and anything downstream that splits on commas will get the wrong number of pieces. Pick a delimiter that cannot occur in the data, such as a pipe (" | "), when the output is going to be parsed again later.
When to Use & Instead
TEXTJOIN is not always the right answer. For exactly two pieces with a space between them, the & operator is shorter and reads better:
=B2&" "&B3 That returns "Maya Chen" and nobody needs a function call for it. Reach for TEXTJOIN the moment one of three things is true: a piece might be missing, you are joining a range rather than a handful of cells, or the same delimiter has to repeat several times.
The CONCATENATE and TEXTJOIN guide walks through all three approaches side by side if you want the fuller comparison.
Tips and Best Practices
-
Default to TRUE. Blank fields are normal in real data. Starting with
TRUEmeans the formula keeps working when a field goes missing, rather than sprouting a stray delimiter on that one row. -
Clean the pieces before joining, not after. Wrap individual values in TRIM or PROPER inside the TEXTJOIN. Cleaning afterwards is harder because the delimiters get in the way.
-
Prefer a range over a list of cells.
=TEXTJOIN(", ", TRUE, B4:B6)survives an inserted row.=TEXTJOIN(", ", TRUE, B4, B5, B6)does not. -
Choose a delimiter that cannot appear in the data. A pipe or a semicolon is safer than a comma when the output will be split apart again later.
-
Use CHAR(10) for anything that reads like an address. One cell, several lines, wrapping turned on. It looks far better in a printed sheet than a single run-on line.
Related Google Sheets Tutorials
- Text Functions in Google Sheets: the full pillar on cleaning, extracting and combining text
- CONCATENATE and TEXTJOIN: the three ways to combine text, compared side by side
- SPLIT Function in Google Sheets: the opposite job, breaking one cell into pieces
- TRIM and CLEAN in Google Sheets: strip stray spaces before you join
- LEFT, RIGHT and MID in Google Sheets: pull out the part of a string you actually want
Frequently Asked Questions
How do I join a whole column into one cell in Google Sheets?
Pass the range to TEXTJOIN instead of listing cells. =TEXTJOIN(", ", TRUE, A2:A50) joins every value in A2:A50 into a single cell, separated by a comma and a space. The TRUE skips any blank rows in the range, so you get no gaps in the output. This is the main advantage TEXTJOIN has over CONCATENATE and the & operator, neither of which expands a range.
Why does my TEXTJOIN have double commas?
The second argument is set to FALSE, so TEXTJOIN is including the empty cells and placing a delimiter on both sides of each one. Change it to TRUE: =TEXTJOIN(", ", TRUE, B4, B5, B6). With TRUE, an empty cell contributes nothing at all, so the delimiter around it disappears with it. Double delimiters are the single most common TEXTJOIN complaint and the fix is always that argument.
Can TEXTJOIN add a line break between values?
Yes. Use CHAR(10) as the delimiter: =TEXTJOIN(CHAR(10), TRUE, A2:C2). CHAR(10) is the newline character, so each value lands on its own line inside the one cell. You also need to turn wrapping on for the breaks to show, with Format > Wrapping > Wrap. Without wrapping the cell displays everything on one line.
Does TEXTJOIN work with numbers and dates?
It accepts them, but it converts them to plain text and drops the display formatting. A cell showing $1,250.00 joins as 1250, and a date showing 2026-03-16 joins as the serial number 46097. Wrap each one in TEXT to keep the formatting: =TEXTJOIN(", ", TRUE, TEXT(B2, "$#,##0.00"), TEXT(C2, "YYYY-MM-DD")).
Why is the delimiter the first argument in TEXTJOIN?
Because TEXTJOIN accepts an unlimited list of pieces at the end, so anything that comes after them could not be told apart from another piece. The delimiter and the ignore_empty switch have to come first for the open-ended list to work. It is the same reason SUMIFS puts its sum range first. Read the argument order as: what goes between, whether to skip blanks, then the stuff.
Frequently Asked Questions
How do I join a whole column into one cell in Google Sheets?
Why does my TEXTJOIN have double commas?
Can TEXTJOIN add a line break between values?
Does TEXTJOIN work with numbers and dates?
Why is the delimiter the first argument in TEXTJOIN?
You've googled this formula before. Probably more than once.
Basic Training is a free course inside a real Google Sheet that grades every formula the moment you press Enter. 7 lessons, about 40 minutes, and this loop ends.
Try the Sheet That Grades YouFree. No spam, ever.