Templates, guides & honest tool reviews for small business

Sunday, November 29, 2026

TEXTSPLIT in Excel: Split Text Into Cells With a Formula

TEXTSPLIT in Excel - explanatory illustration for textsplit function in excel
Illustration: TEXTSPLIT in Excel

Section: Excel & Google Sheets

TEXTSPLIT in Excel splits one piece of text into several cells using a formula. =TEXTSPLIT(A2,",") turns a comma separated string into a row of values, and the result spills into the cells beside it. It is the formula version of the Text to Columns wizard, and Microsoft describes it as the inverse of TEXTJOIN. This guide covers the syntax, the delimiter options most people miss, how to split down rows instead of across columns, and what to do if your version of Excel does not have it. The sample data is made up.

What TEXTSPLIT does

The function takes a text string and one or more delimiters and returns the pieces as an array. Because it returns an array, it spills, so you type one formula and the values fill the cells to the right. Nothing is overwritten in the source cell, and the split updates when the text changes. That is the difference between TEXTSPLIT and the wizard, which writes fixed values once and has to be run again for new rows.

The syntax

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

  • text is the string or cell to split.
  • col_delimiter is what separates the pieces across columns, such as a comma or a semicolon.
  • row_delimiter is optional and splits down rows instead.
  • ignore_empty takes TRUE to skip empty pieces, which is what you want when a string has double commas.
  • match_mode controls whether the delimiter match is case sensitive, 0 for case sensitive and 1 for not.
  • pad_with fills the gaps when rows have different numbers of pieces, so the result stays rectangular.
Arguments (made up) - explanatory illustration for textsplit function in excel
Arguments (made up) (explanatory illustration, not a software screenshot).

Split by a comma

With "Red, Green, Blue" in A2, =TEXTSPLIT(A2,",") returns three values in three cells. The pieces keep their leading spaces, because the space is part of the text. Wrap the result in TRIM, or split on ", " instead of ",", to clean them up: =TRIM(TEXTSPLIT(A2,",")) works because TRIM accepts an array.

Split on more than one delimiter

A real export rarely uses a single separator. A phone number may arrive as "(555) 010-2233" and a product code as "P-204/XL". Pass the delimiters as an array constant in braces: =TEXTSPLIT(A2,{" ","-","/","(",")"}). The function tries all of them in one pass, which can keep several separators in one formula. Combine it with ignore_empty set to TRUE and the empty pieces from the brackets disappear.

Delimiters - explanatory illustration for textsplit function in excel
Delimiters (explanatory illustration, not a software screenshot).

Split down rows

The third argument splits by rows. =TEXTSPLIT(A2,,";") with a semicolon in the row position turns a list separated by semicolons into a column. Leave the column delimiter empty, as shown, and give the row delimiter. This is the quick way to turn a pasted list into rows you can filter and sort.

Handle uneven rows

When each row has a different number of pieces, the result can look ragged. Set pad_with to "" and the short rows are filled with blanks, so the block is rectangular and easier to reference. Without it, Excel pads with #N/A, which is visible and often mistaken for an error in the source data.

Versions - explanatory illustration for textsplit function in excel
Versions (explanatory illustration, not a software screenshot).

Which versions have it

Microsoft lists TEXTSPLIT for Excel for Microsoft 365, Excel 2024, Excel for the web and the Mac versions of those. Excel 2021, 2019 and 2016 do not have it, and a workbook that uses it shows #NAME? there. If you share files with people on older versions, use Text to Columns, or the older text formulas. Our guide to LEFT, RIGHT and MID covers the manual route, and CONCATENATE does the reverse job.

Put it back together

TEXTJOIN is the pair for TEXTSPLIT. =TEXTJOIN(", ",TRUE,TRIM(TEXTSPLIT(A2,","))) normalises a messy list into one clean string with a single space after each comma. The same trick cleans imported data before it goes into a report. See the TEXTJOIN guide for the delimiter and ignore empty arguments.

Use one piece of the result

Wrap the split in INDEX to pull a single field: =INDEX(TEXTSPLIT(A2,","),1,2) returns the second piece, which is the formula equivalent of MID with a FIND. That formula handles A2 only. For separate source rows, fill one formula per row while keeping the horizontal outputs clear. A comma inside an address can be real content, so delimiter splitting is not a reliable address parser.

Errors - explanatory illustration for textsplit function in excel
Errors (explanatory illustration, not a software screenshot).

Split a column of full names

A list of names in one column is the everyday case. Put =TEXTSPLIT(A2," ") in the first row and it spills into first name and last name for every row it is filled down to. Two word names work, and three word names produce three pieces with the surname split, so check the result before you trust it. For a list where some people have a middle name and others do not, do not assume padding identifies the surname. Review names manually; a fixed delimiter cannot infer which words belong together. This is the same job that the Text to Columns wizard does with a space delimiter, done once as a formula.

Errors and fixes

  • #NAME? The version does not support TEXTSPLIT. Check the version before debugging the formula.
  • #SPILL! The cells to the right are not empty. Clear them or move the formula.
  • #N/A in the result. Rows have different numbers of pieces. Set pad_with to an empty string.
  • Leading spaces remain. The delimiter includes a space, or the text does. Wrap the result in TRIM.
  • Nothing splits. The delimiter does not match, often because the file uses a semicolon or a non breaking space. Copy the character from the text into the formula.

Questions and answers

Does TEXTSPLIT change the original cell?

No. It returns new values in the spill range. The source text stays as it was.

Can I split into a fixed number of columns?

Not directly. Split into all pieces, then use INDEX or CHOOSECOLS to keep the ones you need.

Does TEXTSPLIT work in Google Sheets?

Google Sheets has SPLIT, which has different delimiter handling. Its split_by_each setting controls whether delimiter characters are treated separately. TEXTSPLIT is an Excel function.

Can I split text that contains the delimiter as data?

Not cleanly. TEXTSPLIT has no quote handling, so a comma inside a quoted field still splits. Clean the source or use Power Query for that file.

Is TEXTSPLIT faster than Text to Columns?

It is faster to maintain, because it updates when the text changes. For a one-off cleanup of a few hundred rows, the wizard is still fine.

Official references

العربية