Excel functions · Text

TEXTJOIN function in Excel

TEXTJOIN combines text from several cells or whole ranges into one string, with a delimiter such as a space or comma between each piece, and can skip empty cells. =TEXTJOIN(" ", TRUE, A2:C2) turns First, Middle and Last name columns into one full name.

Last reviewed

Syntax

=TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...)
delimiterrequired
What goes between each piece, such as " " or ", ". Use "" for nothing.
ignore_emptyrequired
TRUE skips empty cells; FALSE keeps them, which can leave double delimiters.
text1required
The first text, cell or range to join.
text2, ...optional
More text, cells or ranges, up to 252 in all.
  • Unlike CONCAT, it adds the delimiter for you and accepts whole ranges.
  • Combine with FILTER to list matching items in one cell: TEXTJOIN(", ", TRUE, FILTER(...)).

Which versions have TEXTJOIN

Microsoft 365, Excel for the web, and Excel 2019 or later (Windows and Mac). Not in Excel 2016.

TEXTJOIN availability by Excel version
VersionHas it
Microsoft 365 (Windows and Mac)Yes
Excel for the webYes
Excel 2024Yes
Excel 2021Yes
Excel 2019Yes
Excel 2016No

Google Sheets

Google Sheets has TEXTJOIN with the same arguments.

Examples

The examples use this sample sheet.

Contacts (A1:D3)
RowABCD
1FirstMiddleLastCity
2MariaJ.LopezAustin
3SamChenDenver

B3 is empty: Sam has no middle name.

  1. 1.Full name from three columns

    =TEXTJOIN(" ", TRUE, A2:C2)

    Result: Maria J. Lopez

    A space goes between each of the three cells.

  2. 2.Skip a blank middle name

    =TEXTJOIN(" ", TRUE, A3:C3)

    Result: Sam Chen

    ignore_empty is TRUE, so the empty B3 doesn't leave a double space.

  3. 3.A comma-separated list

    =TEXTJOIN(", ", TRUE, D2:D3)

    Result: Austin, Denver

    Joins a whole column into one cell.

Common errors and fixes

TEXTJOIN errors, causes and fixes
ErrorWhy it happensFix
#VALUE!The joined text is longer than 32,767 characters, the most a cell can hold.Join fewer cells, or split the result across several cells.
#NAME?Your Excel doesn't have TEXTJOIN (Excel 2016 or older).Join with & or CONCATENATE, or use Microsoft 365 or Excel 2019 or later.

Do it with GPTExcel

Skip writing TEXTJOIN by hand

Upload your Excel or CSV file to Chat and ask in plain English. GPTExcel writes the formula for your file and your version of Excel or Google Sheets.

your-file.xlsx

Combine first, middle and last name into a Full name column, skipping blanks.

Done. I used TEXTJOIN on your sheet and checked the results against your data.

your-file-updated.xlsxYour original stays unchanged
  • Written for your platform and version
  • Checked against your actual data
  • Newest functions looked up in official docs
Try it free Formula Generator

Free plan, no credit card.

TEXTJOIN questions

What's the difference between TEXTJOIN and CONCAT?
TEXTJOIN puts a delimiter between pieces and can skip empty cells. CONCAT just glues values together, so you type every space or comma yourself.
How do I join cells with a line break?
Use CHAR(10) as the delimiter, =TEXTJOIN(CHAR(10), TRUE, A2:C2), then turn on Wrap Text for the cell.

Skip the formula hunt

Upload a spreadsheet and ask in plain English. Free plan, no credit card.

Start free