Google Sheets function · Text
SPLIT in Google Sheets: syntax and examples
SPLIT divides a text at a delimiter and puts each piece in its own cell, to the right of the formula. It is the quick way to separate names, codes and lists.
Syntax
SPLIT(text, delimiter, [split_by_each], [remove_empty_text])
Arguments
| Argument | Type | Required | What it does |
|---|---|---|---|
text | text | yes | The text to cut. Use a single cell or a string. A range is cut only in its first cell. |
delimiter | text | yes | The character or string to split on. |
split_by_each | boolean | no | TRUE (default) splits on each character of delimiter. FALSE splits only on the whole string. |
remove_empty_text | boolean | no | TRUE (default) drops empty pieces. FALSE keeps them as empty cells. |
Examples
The examples use this table, starting in A1:
| red,green,blue |
| B-300-XL |
| Ana Pop |
| a1 |
=SPLIT(A1, ",")Result:
| red | green | blue |
Comma separated words go into three cells in a row.
Run in a Google Sheet (English US locale) on .
=SPLIT(A2, "-")Result:
| B | 300 | XL |
A code cut at each hyphen.
Run in a Google Sheet (English US locale) on .
=SPLIT(A3, " ")Result:
| Ana | Pop |
First and last name into two cells.
Run in a Google Sheet (English US locale) on .
=SPLIT("a, b; c", ", ;")Result:
| a | b | c |
Several delimiter characters at once: the text is cut at every comma, space and semicolon, and empty pieces are dropped.
Run in a Google Sheet (English US locale) on .
=SPLIT("a--b-c", "--", FALSE)Result:
| a | b-c |
With split_by_each set to FALSE, only the two-character string -- is a delimiter, so b-c stays whole.
Run in a Google Sheet (English US locale) on .
Common errors
- The first argument should be one cell or one string. Given a range such as A1:A3, SPLIT cuts only the first cell and ignores the rest without any error. Wrap it in ARRAYFORMULA to cut every row.
- Pieces that look like numbers become numbers, so 007 turns into 7. The zeros are lost in the result.
- By default every character in delimiter is a separator, so ", " cuts at the comma and at the space. Set split_by_each to FALSE to cut on the whole string only.
- The result needs free cells to the right. Filled cells there block the output.
Compared with Excel
Excel has no SPLIT function. Its closest match is TEXTSPLIT in Excel 365, or the Text to Columns wizard.