TEXTJOIN joins text from cells or ranges with a separator you choose. =TEXTJOIN(", ",TRUE,B2:B7) returns "Carlos, Nia, Ben, Hana, Omar, Ruth" from six volunteer names. The first argument is the separator, the second (TRUE) skips empty cells, and everything after that is the text to join. It needs Excel 2019, Excel 2021 or Microsoft 365.
Functions
TEXTJOIN Excel Function: Syntax, Examples, Fixes
Try this now
" "), to get "I love Excel!".| A | B | C | D | |
|---|---|---|---|---|
| 1 | I | |||
| 2 | love | |||
| 3 | Excel! | |||
| 4 | ||||
| 5 |
Ready to practice?
Apply what you just learned with interactive exercises.
This page explains each argument, then works through joins with commas, line breaks, blanks, numbers, conditions and FILTER. It compares TEXTJOIN with CONCAT and the & operator, lists the versions that have it, and ends with the errors you are likely to meet and a small reporting job built from start to finish.
TL;DR
- The pattern is =TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...). The separator comes first.
- Set ignore_empty to TRUE to skip blank cells. With FALSE, every blank leaves an extra separator behind.
- A range counts as one argument, so =TEXTJOIN(", ",TRUE,B2:B7) joins all six cells.
- For a conditional join, put IF inside TEXTJOIN. Rows that fail the test return "", and TRUE makes TEXTJOIN skip them.
- Numbers join as plain text and dates join as serial numbers. Use TEXT on a date first.
- Excel 2016 sold as a one-time purchase and earlier versions do not have it and show #NAME?.
Table of Contents
- The sample data used on this page
- TEXTJOIN syntax and arguments
- How to join cells with a comma using TEXTJOIN
- What ignore_empty does to blank cells
- Join with a line break or no separator
- Join numbers and add labels to each item
- TEXTJOIN with IF: join only the matching rows
- TEXTJOIN with FILTER and UNIQUE
- TEXTJOIN compared with CONCAT and the ampersand
- Excel versions
- TEXTJOIN errors and how to fix them
- What learners get wrong
- A worked job scenario: a volunteer roster by team
- Practice
- FAQ
- Sources
The sample data used on this page
Every example uses this volunteer list for a weekend charity event. Type it from A1. C3 is blank because Nia has no role yet, and column F holds a list of team names for the final job.
| A | B | C | D | E | F | |
| 1 | Team | Volunteer | Role | Hours | Team list | |
| 2 | Setup | Carlos | Lead | 6 | Setup | |
| 3 | Setup | Nia | 4 | Registration | ||
| 4 | Registration | Ben | Lead | 5 | Cleanup | |
| 5 | Registration | Hana | Greeter | 3 | ||
| 6 | Setup | Omar | Driver | 7 | ||
| 7 | Cleanup | Ruth | Lead | 8 |
TEXTJOIN syntax and arguments
=TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)
| Argument | Required | What it does |
| delimiter | Required | The text placed between each item. It can be a comma and space in quotes, a single character, an empty string "", or a cell reference. |
| ignore_empty | Required | TRUE skips empty cells. FALSE keeps them, which leaves doubled separators. |
| text1 | Required | The first thing to join. A cell, a range, an array or typed text. |
| text2, ... | Optional | More items. Microsoft documents a limit of 252 text arguments. |
The result can be at most 32,767 characters, the most a cell holds. Past that, TEXTJOIN returns #VALUE!.
How to join cells with a comma using TEXTJOIN
The basic job is a comma-separated list from a column:
=TEXTJOIN(", ",TRUE,B2:B7)
This returns Carlos, Nia, Ben, Hana, Omar, Ruth. The delimiter is a comma followed by a space, all inside one pair of quotes. Because TEXTJOIN puts the delimiter only between items, there is no stray comma at the start or end. That is the main reason to prefer it to the & operator for lists.
Change the quotes and you change the look. Use "; " for a semicolon list, " / " for a slash, or " | " for a pipe: =TEXTJOIN(" | ",TRUE,B2:B4) returns Carlos | Nia | Ben.
You can mix a range with single cells and typed text. Excel joins them in the order you list them:
=TEXTJOIN(" ",TRUE,B2,"leads",A2)
This returns Carlos leads Setup. Here the delimiter is a single space, so the three items read as a sentence.
The delimiter can also be a cell reference. If a cell holds a comma and a space, pass that cell as the first argument and the list uses it. Change the cell and every list that points at it changes too.
What ignore_empty does to blank cells
Column C has five roles and one blank. Join it with ignore_empty set to TRUE:
=TEXTJOIN(", ",TRUE,C2:C7)
This returns Lead, Lead, Greeter, Driver, Lead. The blank in C3 is skipped. Now switch the second argument to FALSE:
=TEXTJOIN(", ",FALSE,C2:C7)
This returns Lead, , Lead, Greeter, Driver, Lead. The blank cell still counts as an item, so the comma and space before and after it both stay, leaving a gap in the list. Use FALSE only when you need the positions to line up, such as when you are joining several columns that must keep their order even if one is empty.
Two traps are worth knowing:
- A cell holding a single space is not empty. TEXTJOIN keeps it, and you get a visible gap even with TRUE. Clean the data with TRIM first, or wrap the range in TRIM so a lone space becomes an empty string. See the TRIM guide.
- A formula that returns "" counts as empty. That is why the IF pattern later on this page works: failing rows return "" and TRUE drops them.
Join with a line break or no separator
Use CHAR(10) as the delimiter to put each item on its own line inside one cell:
=TEXTJOIN(CHAR(10),TRUE,B2:B4)
This returns Carlos, Nia and Ben on three lines. Turn on Wrap Text for the cell to see them. Without it, everything shows on a single line.
An empty delimiter joins items with nothing between them:
=TEXTJOIN("",TRUE,A2:B2)
This returns SetupCarlos. That is the same as CONCAT, with the advantage that you can still skip blanks.
Join numbers and add labels to each item
Numbers are converted to text as they are stored:
=TEXTJOIN(", ",TRUE,D2:D7)
This returns 6, 4, 5, 3, 7, 8. A number keeps its stored digits, not its cell format. A price formatted as $1,250.50 would join as 1250.5, and a date joins as a serial number such as 46095. Wrap dates and currency in TEXT before joining, with a format code such as "mmm d" for a date. Our CONCAT guide shows the same fix with worked formats.
To add a label to every item in the list, join the label inside the argument. Operators work on a whole range inside TEXTJOIN:
=TEXTJOIN(", ",TRUE,B2:B4&" ("&D2:D4&"h)")
This returns Carlos (6h), Nia (4h), Ben (5h). Each name is joined with its hours before TEXTJOIN joins the three pieces. In Excel 2019 and earlier you must confirm this with Ctrl+Shift+Enter because it works on an array. In Microsoft 365 and Excel 2021 or later, press Enter.
TEXTJOIN with IF: join only the matching rows
IF tests every row of a column. Rows that pass return the value, and the rest return an empty string:
=TEXTJOIN(", ",TRUE,IF(A2:A7="Setup",B2:B7,""))
This returns Carlos, Nia, Omar, the three volunteers on the Setup team. IF produces an array of six items: Carlos, Nia, an empty string, an empty string, Omar and another empty string. TRUE drops the empty ones.
Combine tests by multiplying them. Multiplication means AND:
=TEXTJOIN(", ",TRUE,IF((A2:A7="Setup")*(D2:D7>=5),B2:B7,""))
This returns Carlos, Omar. Nia is on Setup but has only 4 hours, so she fails the second test. For OR, add the tests instead: (A2:A7="Setup")+(A2:A7="Cleanup").
If you are on Excel 2019 or earlier, these IF formulas need Ctrl+Shift+Enter. Without it the formula can return a wrong result or an error. The array formulas tutorial explains why. Microsoft 365 and Excel 2021 or later handle arrays directly. See the IF function guide if you want a refresher on the test itself.
TEXTJOIN with FILTER and UNIQUE
Where FILTER exists, it is a cleaner way to pick rows:
=TEXTJOIN(", ",TRUE,FILTER(B2:B7,A2:A7="Setup"))
This returns Carlos, Nia, Omar. The result is the same as the IF version, but the intent is easier to read. FILTER is covered in our FILTER function guide.
One difference matters. When nothing matches, FILTER returns a #CALC! error and TEXTJOIN passes it on. Supply the third argument to FILTER to give a fallback:
=TEXTJOIN(", ",TRUE,FILTER(B2:B7,A2:A7="Parking","none"))
This returns none. With the IF version there is no error: no rows match, so TEXTJOIN gets six empty strings and returns an empty string.
UNIQUE lists each value once. To show the teams that appear in column A:
=TEXTJOIN(", ",TRUE,UNIQUE(A2:A7))
This returns Setup, Registration, Cleanup. FILTER and UNIQUE need Excel 2021 or later, or Microsoft 365. In Excel 2019 stay with IF. The dynamic arrays guide lists the other functions that work this way.
TEXTJOIN compared with CONCAT and the ampersand
| Need | Best choice | Why |
| Join two or three cells with a space | & operator | Shortest, works in every version |
| Join a range with no separator | CONCAT | Simple and readable |
| Join a range with a separator | TEXTJOIN | One argument sets the separator |
| Skip blank cells | TEXTJOIN | ignore_empty does it for you |
| Join only rows that meet a test | TEXTJOIN with IF or FILTER | CONCAT cannot add separators for you |
| File opens in Excel 2016 or earlier | & operator | TEXTJOIN and CONCAT are missing there |
| One-off join with no later changes | Flash Fill | No formula to maintain |
TEXTJOIN does not change the case of anything. If you need names in proper case, wrap the result in PROPER, as the change case guide shows.
Excel versions
- Excel 2019, Excel 2021, Excel 2024 and Microsoft 365: TEXTJOIN is available.
- Excel for the web: available. Excel for Mac has it in the 2019 and later editions.
- Excel 2016 sold as a one-time purchase, 2013 and 2010: not available. The cell shows #NAME?. Use &, or build the list another way.
- Arrays: TEXTJOIN(...IF(range...)) needs Ctrl+Shift+Enter in Excel 2019. Microsoft 365 and Excel 2021 or later calculate it without that step.
- FILTER and UNIQUE: Excel 2021, Excel 2024 and Microsoft 365 only.
TEXTJOIN errors and how to fix them
| What you see | Cause | Fix |
| #NAME? | The version has no TEXTJOIN, or the name is misspelled | Check the version, then the spelling |
| #VALUE! | The result is longer than 32,767 characters | Split the list, or filter it first |
| #N/A (or another error) | An error value sits in the joined range | Fix the source cell, or wrap the range in IFERROR |
| #CALC! | FILTER found no rows | Add the if_empty argument to FILTER |
| Excel refuses the formula | A required argument is missing, such as ignore_empty | Enter all three leading arguments |
| Doubled separators like "Lead, , Lead" | ignore_empty is FALSE and a cell is blank | Set it to TRUE |
| A gap that looks empty | A cell holds a space, not nothing | Use TRIM on the range |
| 46095 where a date should be | A date joined without TEXT | Use TEXT with a format code |
| A wrong result or #VALUE! | IF array not confirmed in Excel 2019 | Press Ctrl+Shift+Enter |
What learners get wrong
Between 26 September and 3 November 2026, learners made 3,575 first attempts across our TEXTJOIN Function lesson, and 69.7% were right. The slips cluster around the first two arguments. Answers below are shown as stored, in lowercase.
Reading FALSE as "skip blanks." The hardest screen shows a range with a blank in it and asks what the TEXTJOIN with FALSE would return. It had 381 first attempts and only 36.2% were right. The answer mike,susan,bill appeared 110 times, which is what TRUE would give. With FALSE the blank stays as an item, so two commas sit next to each other with nothing between them. The answer mikesusanbill appeared 87 times, as if the separator were ignored. And 44 first attempts typed the formula =textjoin(", ",false,a1:a4) instead of the text it returns. The screen asks for the result, not the formula.
Leaving out an argument. The screen asking for "MikeBillJeff" had 342 first attempts and 67.0% were right. The answers =textjoin(a1:c1) (36 times) and =textjoin(true,a1:c1) (29 times) each skip the delimiter. TEXTJOIN always wants the delimiter first, even when it is empty. The empty delimiter is two quotes with nothing between them. On the sample data, =TEXTJOIN("",TRUE,A2:B2) returns SetupCarlos. Another 16 first attempts on the "Mike, Susan, Bill, Anne" screen wrote =textjoin(", ",a1:a4), which skips ignore_empty. The fix is the middle argument. On the sample data, =TEXTJOIN(", ",TRUE,B2:B5) returns Carlos, Nia, Ben, Hana.
The wrong range shape. On the same "MikeBillJeff" screen, =textjoin("",true,a1:a3) appeared 9 times. The names sit across a row, so the range is A1:C1, not three cells down a column. On the "Mike, Susan, Bill, Anne" screen, =textjoin(", ",true,a:a) appeared 11 times. A whole column pulls in every cell below the list, which is risky when other data lives there. Use the exact range.
A delimiter typed slightly wrong. The screen asking for Iowa~Ohio~Texas had 349 first attempts, 62.5% right. The answers =textjoin("*~",true,a1:a4) (10 times), =textjoin("*-*",true,a1:a4) (9) and =textjoin("~",true,a1:a4) (8) each changed the delimiter. Another 23 first attempts used =textjoin("*~*",false,a1:a4), which has the right delimiter but the wrong second argument for that data. Copy the delimiter exactly from the question.
A worked job scenario: a volunteer roster by team
The event lead wants one line per team for the briefing sheet: the team name, its total hours and the people on it. Build it from the sample data and the team list in F2:F4.
- List the people on each team. In G2 enter:
For Setup this returns Carlos, Nia, Omar. The dollar signs lock the data range so it stays put when you fill down. F2 changes to F3 and F4 on its own.
- Add the team's total hours. The SUMIF function adds hours for one team: =SUMIF($A$2:$A$7,F2,$D$2:$D$7) returns 17 for Setup (6 plus 4 plus 7). Our SUMIF guide explains the arguments.
- Build the full briefing line. Combine the team, hours and names in H2:
This returns Setup (17h): Carlos, Nia, Omar. Fill down to row 4 and the other two lines follow.
- Show hours beside each name. If the lead wants each person's hours in the list, change the value in the IF:
This returns Setup: Carlos (6h), Nia (4h), Omar (7h).
- Send it. Copy H2:H4, paste as values into the email, and each line is ready. If the sheet changes later, the formulas update.
Practice
Open the TEXTJOIN Function lesson and type the formulas yourself rather than reading on. The screens that give you most trouble are the ones where you predict what a formula returns, so do those slowly. If you want to compare it with the older approach, try the CONCAT lesson afterward.
FAQ
What does the TEXTJOIN function do in Excel?
TEXTJOIN joins text from several cells or ranges into one string, with a separator of your choice between the items. The pattern is =TEXTJOIN(", ",TRUE,B2:B7). It can skip blank cells, so the result has no stray commas. It was added in Excel 2019 and is also in Microsoft 365.
How do I use TEXTJOIN with a condition?
Put an IF inside it. For example, =TEXTJOIN(", ",TRUE,IF(A2:A7="Setup",B2:B7,"")) lists only the volunteers on the Setup team. Failing rows return an empty string, and the TRUE argument skips them. In Excel 2019 confirm the formula with Ctrl+Shift+Enter.
What is the difference between TEXTJOIN and CONCAT?
TEXTJOIN takes a delimiter and an ignore_empty argument, so it can put a separator between items and skip blanks. CONCAT only joins items side by side, so you add any separator yourself. Both accept ranges and both are missing from Excel 2016 and earlier.
Why does TEXTJOIN return #NAME? in my workbook?
Your version of Excel does not have the function. TEXTJOIN needs Excel 2019, Excel 2021, Microsoft 365 or Excel for the web. Excel 2016 sold as a one-time purchase and earlier versions show #NAME?. A misspelled function name gives the same error, so check that too.
How do I join cells with a line break in Excel?
Use CHAR(10) as the delimiter: =TEXTJOIN(CHAR(10),TRUE,B2:B4). Then turn on Wrap Text for the cell under the Home tab. The break is stored in the text either way, but Excel only displays it on separate lines when Wrap Text is on.
Does TEXTJOIN remove duplicates?
No. It joins every item you give it. To list each value once, wrap the range in UNIQUE: =TEXTJOIN(", ",TRUE,UNIQUE(A2:A7)) returns Setup, Registration, Cleanup. UNIQUE needs Excel 2021 or Microsoft 365. Older versions need a helper column.
Can TEXTJOIN join a date with text?
It joins the date's stored serial number, so a date such as 14 March 2026 appears as 46095. Convert the date with TEXT first and join the result. For instance, wrap it as TEXT with the format "mmm d" and then pass it to TEXTJOIN with the other items.
Sources
Keep going
Guides people read next.

CHOOSECOLS Function in Excel: Syntax, Examples, Fixes
Learn how the Excel CHOOSECOLS function works, with CHOOSEROWS too: syntax, negative indexes, FILTER combos, version support and fixes for #VALUE! and #SPILL!.
16 minExcel FIND Function: Syntax, Examples and Fixes
Use the Excel FIND function to get a character's position, split text at @ or hyphens, find the second match, and fix #VALUE! errors.
16 minINDEX Function in Excel: Syntax, Examples and Fixes
Learn the Excel INDEX function: return a value by row and column, pull a whole row or column, build dynamic ranges and fix #REF! errors, with examples.
16 min