How to Split Text into Columns in Google Sheets

By Gerard Fernandez · Updated · 3 min read

Full names in one column, "City, Country" pairs, or data pasted from a CSV file all have the same problem: several pieces of information stuck in one cell. Google Sheets can split them into separate columns in seconds.

Split text to columns (menu)

  1. Make sure the columns to the right of your data are empty. The split results go there and overwrite anything in the way.
  2. Select the cells to split, for example A2:A6.
  3. Go to Data → Split text to columns.
  4. Sheets guesses the separator and splits right away. If the guess is wrong, use the Separator box that appears below the data to choose Comma, Semicolon, Period (Full stop in UK English), Space or Custom.

In our test, Detect automatically didn't split "Anna Smith" at all; choosing Space in the box fixed it at once.

The Separator box under the data with the options Detect automatically, Comma, Semicolon, Period, Space and Custom
Real test: the Separator box that appears after Data → Split text to columns.

Keep the original: the menu option replaces your data. If you might need the full text later, copy the column first, or use the SPLIT function below.

The SPLIT function

SPLIT leaves the original cell untouched and puts the pieces in the cells to the right of the formula:

=SPLIT(A2, " ")

Some useful separators:

Text in A2FormulaResult
Anna Smith=SPLIT(A2, " ")Anna | Smith
Boston, USA=SPLIT(A2, ", ", FALSE)Boston | USA
red;green;blue=SPLIT(A2, ";")red | green | blue
Results of SPLIT: Anna | Smith, Boston | USA, red | green | blue, Mary from LEFT and FIND, and 007 abc split into 7 and abc; below, 007 and abc kept by the menu option on Plain text cells
Real test: the SPLIT examples from the table, then "007 abc" (the zeros are lost), and at the bottom the menu option on cells formatted as Plain text (the zeros are kept).

By default, SPLIT treats each character of the separator as a separate delimiter. In the second example, FALSE as the third argument tells it to split only on the exact text ", ".

Names with a middle name

"Mary Ann Lee" split on spaces gives three columns. To get the first word and "everything else", use:

=LEFT(A2, FIND(" ", A2)-1)

for the first name, and

=MID(A2, FIND(" ", A2)+1, 100)

for the rest.

Frequently asked questions

How do I combine columns back into one?

Use =A2&" "&B2, or =TEXTJOIN(" ", TRUE, A2:C2) to join several cells and skip empty ones.

Why did SPLIT remove leading zeros?

SPLIT converts pieces that look like numbers into numbers, so "007" becomes 7. In our test the menu option did the same on normal cells. What worked: select the column and the empty columns to its right, choose Format → Number → Plain text, then use Data → Split text to columns. "007 abc" became 007 and abc.

Why is "Split text to columns" greyed out?

You've selected cells in more than one column. In our test it was greyed out with H8:I9 selected and available again with only H8:H9. Select a single column and try again.