FxFormula Drills

TEXTSPLIT, and joining text back together

TEXTSPLIT breaks one cell into pieces at a delimiter and spills the pieces. TEXTSPLIT("SKU-RED-19", "-") returns SKU, RED, and 19. It is in Microsoft 365, Excel 2024, and Excel for the web, not in Excel 2021 or earlier. Google Sheets uses SPLIT for a column split, not the name TEXTSPLIT. To join pieces, TEXTJOIN can insert a delimiter and skip blanks. CONCAT and & do not skip a blank cell on their own.

Syntax

TEXTSPLIT

TEXTSPLIT(text, col_delimiter, [row_delimiter], [ignore_empty], [match_mode], [pad_with])

col_delimiter splits across columns. row_delimiter splits down rows. The delimiter is one string, not each of its characters, unless you pass an array of delimiters. ignore_empty TRUE drops empty pieces from consecutive delimiters.

TEXTJOIN

TEXTJOIN(delimiter, ignore_empty, text1, ...)

Joins text with a delimiter between the pieces. ignore_empty TRUE skips blank cells. This is the inverse direction of a split. Excel 2019 and later, Microsoft 365, and Google Sheets.

CONCAT and &

CONCAT(text1, ...) and text1 & text2

Both join in the order you write. Neither inserts a delimiter unless you include it yourself, and neither removes the extra delimiter you put beside a blank cell. & works in every Excel version. CONCAT is in Excel 2019 and later and in Google Sheets.

Comparison

QuestionTEXTSPLITTEXTJOINCONCAT or &
DirectionOne cell into manyMany cells into one, with a delimiterMany cells into one, no automatic delimiter
Blank cellsignore_empty can drop empty piecesTRUE skips blanks so you do not get a double space& keeps the spaces you typed around a blank
Updates when the source changesYesYesYes
Excel 2021NoYesCONCAT yes. & yes
Google SheetsUse SPLIT, which splits into columnsTEXTJOIN is availableCONCAT and & are available

Worked examples

Split a SKU on the hyphen

SKU-RED-19 has three pieces: the family, the color, and the size. TEXTSPLIT spills them across the row. LEFT of three characters returns only the family, which is the piece-by-piece approach when TEXTSPLIT is not available.

One SKU in A2.
RowA
1SKU
2SKU-RED-19
  • =TEXTSPLIT(A2,"-") → SKU
  • C2 spilled → RED
  • D2 spilled → 19
  • =LEFT(A2,3) → SKU

The delimiter is the hyphen, as one string. SKU lands in the formula cell, RED spills to the next column, and 19 spills one column further. The size comes back as text, so a code such as 04 would keep its zero. LEFT only knows a length, not a delimiter. It happens to return SKU because the family is three characters. MID and RIGHT are how you take the later pieces without TEXTSPLIT. The split-SKU drill practices those three functions.

Join names, and skip a missing middle name

Ada has no middle name. The middle cell is blank. Grace has the middle initial M. TEXTJOIN with TRUE skips Ada's blank and still keeps Grace's initial. CONCAT and & need you to handle the blank yourself.

Ada, a blank middle cell, Lovelace. Grace, M, Hopper.
RowABC
1FirstMiddleLast
2AdaLovelace
3GraceMHopper
  • =TEXTJOIN(" ",TRUE,A2,B2,C2) → Ada Lovelace
  • =TEXTJOIN(" ",TRUE,A3,B3,C3) → Grace M Hopper
  • =CONCAT(A2,B2,C2) → AdaLovelace
  • =A2&" "&B2&" "&C2 → Ada Lovelace

TEXTJOIN puts one space between the pieces it keeps. Ada's blank middle name disappears, leaving a single space. Grace keeps M because that cell is not blank. CONCAT of the three cells has no separator at all, so Ada and Lovelace run together. The & formula puts a space around the blank middle cell, so Ada's result contains two spaces. That double space is the usual reason to prefer TEXTJOIN when a piece might be empty.

When to use which

Use TEXTSPLIT in Microsoft 365 or Excel 2024

A code with a stable delimiter, split into columns that must stay live, is TEXTSPLIT. Text to Columns on the Data tab does the split once and will not follow a change to the source cell.

Use LEFT, MID, and RIGHT when the file is Excel 2021 or older

Fixed positions still work. They are brittle if a piece changes length. The SKU drill assumes a 3-character family, a 3-character color, and a 2-character size, which is a fair use of MID.

Use TEXTJOIN to build a label

Full names, address lines, and comma-separated lists. Pass TRUE when a missing piece should not leave a doubled delimiter. The full-name drill is the simple two-piece case.

Common mistakes

Assuming Excel 2021 has TEXTSPLIT

Excel 2021 has XLOOKUP, FILTER, and UNIQUE. It does not have TEXTSPLIT. The formula returns #NAME? there. Excel 2024 and Microsoft 365 have it.

Pasting a Google Sheets SPLIT into Excel

SPLIT is not an Excel function. TEXTSPLIT is not the Google Sheets name. The default split rules also differ: SPLIT treats each character of the delimiter as its own delimiter unless you turn that off, while TEXTSPLIT looks for the whole delimiter string.

A double space from &

The Ada example shows "Ada Lovelace" when a space is written on both sides of a blank cell. TEXTJOIN with TRUE avoids that.

Losing a leading zero

If a size code is numeric, 04 becomes 4 as soon as something converts it to a number. TEXTSPLIT and RIGHT return text. A later VALUE or a numeric format can strip the zero.

Versions and compatibility

TEXTSPLIT is in Excel for Microsoft 365, Excel 2024, and Excel for the web. It is not in Excel 2021, Excel 2019, or earlier. Google Sheets splits columns with SPLIT(text, delimiter). SPLIT's default is to split on each character inside the delimiter string.

TEXTJOIN and CONCAT are in Excel 2019 and later, Microsoft 365, and Google Sheets. The & operator is in every Excel version and in Google Sheets.

Text to Columns is a desktop Excel command. Like Advanced Filter, it does not stay attached to the source cell.

Practice on Formula Drills

Free drills are open with no account. Premium drills show the problem to everyone and grade the sheet for subscribers.

Free exercises

Premium exercises

Function pages

FAQ

Is TEXTSPLIT in Excel 2021?

No. Excel 2021 includes the first wave of dynamic-array functions, including FILTER, UNIQUE, SORT, and XLOOKUP. TEXTSPLIT came later and is in Microsoft 365 and Excel 2024.

What is the Google Sheets equivalent?

SPLIT. It spills across the row. Pass FALSE as the third argument if the delimiter is a multi-character string that should stay in one piece. TEXTSPLIT looks for the whole delimiter by default.

Which join function skips blanks?

TEXTJOIN, when the second argument is TRUE. CONCAT and & keep every argument, including the spaces you placed next to a blank.

Can I split into rows instead of columns?

Leave the column delimiter blank and pass the row delimiter. In Excel that is TEXTSPLIT(A2, , ",") for a comma-separated list down the sheet. The SKU example uses the column delimiter because the pieces should sit on one row.