English
/

Text to Columns in Excel and Google Sheets (Formulas)

Last edited Nov 6, 2026 · 5 min read

To split text into columns in Excel, select the source cells and choose Data > Text to Columns, then choose the delimiter and destination. For a formula that updates with the source cell, use =TEXTSPLIT(A2,",") to split at commas.

On this page▾
  1. Is there a Text to Columns formula in Excel?
  2. How do you do Text to Columns in Excel?
  3. Option 2: TEXTSPLIT (a split that updates)
  4. Handling empty pieces and several delimiters
  5. Splits give you text, not numbers
  6. Getting just one piece: TEXTBEFORE and TEXTAFTER
  7. When the result says #SPILL!
  8. What is the Google Sheets split text to columns formula?
  9. Frequently asked questions
  10. How do I keep empty fields in Google Sheets?
  11. Why does TEXTSPLIT add #N/A to a row?
  12. What to check before splitting
Goal Excel Google Sheets
One-time split Data > Text to Columns Data > Split text to columns
Split by formula =TEXTSPLIT(A2,",") =SPLIT(A2,",")
Delimiter longer than one character Used as a whole Each character splits unless the third argument is FALSE
Consecutive delimiters Empty cell by default Treated as one by default

Is there a Text to Columns formula in Excel?

The formula equivalent is TEXTSPLIT, which Microsoft describes as the wizard in formula form. For comma-separated text in A2, =TEXTSPLIT(A2,",") spills pieces across columns; =TEXTSPLIT(A2,,",") puts them down rows instead.

Choose the menu command for a one-time conversion and a formula when the result should respond to source changes. Both need a destination with room for the separate pieces.

The reverse, joining cells into one, is covered in How to Combine Text From Two Cells in Excel.

How do you do Text to Columns in Excel?

Microsoft's steps for the Convert Text to Columns Wizard:

  1. Select the cell or column with the text.
  2. Go to Data > Text to Columns.
  3. Choose Delimited, then Next.
  4. Pick the delimiters your data uses, such as Comma and Space. The Data preview window shows the result.
  5. Select Next, choose a Destination, and select Finish.

The split pieces fill columns to the right, so pick a starting cell with enough empty columns beside it, or work on a copy.

Google Sheets has the same tool at Data > Split text to columns. Google's help page uses the "Last name, First name" case as its example and lets you choose the separator from a drop-down, or leave it on Detect automatically.

The menu approach is quick, but the result is static. If the source cell changes next week, the split columns do not.

Option 2: TEXTSPLIT (a split that updates)

In current versions of Excel, TEXTSPLIT does the same job as a formula. Microsoft describes it as working like the Text to Columns wizard, "but in formula form," and as the inverse of TEXTJOIN. The basic shape is TEXTSPLIT(text, col_delimiter).

With "Dakota Lennon Sanchez" in A3:

=TEXTSPLIT(A3," ")

The result spills across three cells: Dakota, Lennon, Sanchez. For the name in last-name-first order, include the space in the delimiter:

=TEXTSPLIT(A2,", ")

With "Lopez, Maria" in A2, this returns Lopez and Maria with no leftover comma or space. If you split on a space alone, the first piece comes back as "Lopez," with the comma still attached.

Product codes work the same way. =TEXTSPLIT(A5,"-") on SKU-1042-BLU-L returns SKU, 1042, BLU and L in four cells.

Handling empty pieces and several delimiters

When two delimiters sit next to each other, TEXTSPLIT creates an empty cell by default. Microsoft lists an optional fourth argument, ignore_empty, which defaults to FALSE. With "red,,green,blue" in A7:

=TEXTSPLIT(A7,",")
=TEXTSPLIT(A7,",",,TRUE)

The first returns red, an empty cell, green and blue. The second returns just red, green, blue. Note the two commas before TRUE: they skip the optional row delimiter.

To split on more than one distinct delimiter, Microsoft's remarks say to use an array constant in curly braces, such as {",","."}. TEXTSPLIT can also split down rows. Microsoft's own example, =TEXTSPLIT(A2,",",";") on "1,2,3;4,5,6", returns a grid of two rows and three columns.

Splits give you text, not numbers

Every piece TEXTSPLIT returns is text, even when it looks like a number. That is helpful for ZIP codes: splitting "Iselin, NJ, 08830" keeps 08830 with its leading zero. It is a problem if you want to add the pieces:

=SUM(TEXTSPLIT("1,2,3",","))
=SUM(--TEXTSPLIT("1,2,3",","))

The first returns 0, because SUM ignores text. The second returns 6. The double minus converts each piece to a number before SUM sees it.

Getting just one piece: TEXTBEFORE and TEXTAFTER

Often you only need the first name or the last word. Two related functions handle that without spilling extra cells:

=TEXTBEFORE(A3," ")
=TEXTAFTER(A3," ",-1)

These return Dakota and Sanchez. In TEXTAFTER, the -1 means "count from the end," so you get the text after the last space no matter how many middle names there are.

Microsoft's TEXTBEFORE page warns that it returns #N/A when the delimiter is not found. A one-word name like "Socrates" has no space, so =TEXTBEFORE(A8," ") returns #N/A. Microsoft's examples show the fix: the match_end argument, set to 1, treats the end of the text as a delimiter. =TEXTBEFORE(A8," ",,,1) returns Socrates.

When the result says #SPILL!

Because TEXTSPLIT returns several cells, it needs empty room to spill into. If any of those cells already holds something, even a single typed letter, the formula shows #SPILL!. Microsoft's guidance: select the formula cell to see a dashed border around the intended range, use Select Obstructing Cells from the error alert, then clear or move what is in the way. Microsoft also notes that spilled formulas are not supported inside Excel tables, and cannot spill into merged cells.

What is the Google Sheets split text to columns formula?

In Google Sheets, =SPLIT(A2,", ",FALSE) splits at a comma followed by a space without splitting every space inside a name.

Google's SPLIT function looks similar, but its documentation describes this default: each character in the delimiter is treated separately. A delimiter of ", " splits at every comma and every space, so a city like "New York" would break apart too. Google's page explains that setting the third argument, split_by_each, to FALSE turns this off. Its fourth argument, remove_empty_text, defaults to TRUE, the opposite of Excel's TEXTSPLIT.

Frequently asked questions

How do I keep empty fields in Google Sheets?

Set the fourth argument to FALSE. For example, =SPLIT("red,,green",",",FALSE,FALSE) preserves the empty field between red and green. The third FALSE treats the delimiter as a whole string; the fourth controls empty fields. In Excel, =TEXTSPLIT("red,,green",",") already preserves that empty field because ignore_empty defaults to FALSE.

Why does TEXTSPLIT add #N/A to a row?

When a split produces rows of different lengths, shorter rows need padding to form a rectangular result. The default pad_with value is #N/A. For 1,2;3, =TEXTSPLIT(A2,",",";",FALSE,0,"") produces two rows and two columns, with a blank-looking padding value after 3.

What to check before splitting

For a spilled formula, a #SPILL! error can come from existing entries or merged cells in the destination; spilled formulas cannot spill into merged cells. In Sheets, SPLIT treats each character of the delimiter separately unless split_by_each is FALSE.

Sources

  1. Microsoft Support, Split text into different columns with the Convert Text to Columns Wizard
  2. Microsoft Support, TEXTSPLIT function
  3. Microsoft Support, TEXTBEFORE function
  4. Microsoft Support, How to correct a #SPILL! error
  5. Google Docs Editors Help, SPLIT function

About this guide

Howlane operator · Checked against the official sources listed above. It is general information, not professional advice.

AboutEditorial standardsCorrectionsReport an error

Edit history

  • Updated
  • Updated
  • Updated
  • Updated
  • Published