SPLIT in Google Sheets separates text into neighboring cells. Enter =SPLIT(A2,",") in an empty cell to divide A2 at each comma. The results expand horizontally.
Split a Comma-Separated String
Enter this dataset starting in A1. Leave cells marked “(blank)” empty.
| Source |
|---|
| Maya,Stone,Dubai |
Enter this formula in E2:
=SPLIT(A2,",")
E2:G2 displays Maya, Stone, and Dubai. The original string stays in A2. Editing A2 automatically updates the split output.
![SPLIT example with a bordered dataset and result [['Maya', 'Stone', 'Dubai']].](https://geosheets.com/wp-content/uploads/2026/09/geosheets-split-formula-example.png)
SPLIT Function Syntax
=SPLIT(text, delimiter, [split_by_each], [remove_empty_text])
| Argument | Meaning |
|---|---|
| text | The cell or string to split |
| delimiter | The separator to remove |
| split_by_each | TRUE by default: split on each delimiter character |
| remove_empty_text | TRUE by default: omit empty pieces |
Set the third argument to FALSE when the separator contains multiple characters that must stay together. Set the fourth to FALSE when blank fields must keep their positions.
Leave room for the result. Existing content in a destination cell prevents expansion and returns #REF!. Move that content or choose another output cell; SPLIT does not overwrite it.
Split Product Codes by a Dash
=SPLIT("AB-12-XY","-")
The result is AB, 12, and XY. The numeric-looking segment becomes a number. In =SPLIT("001-02","-"), the results are 1 and 2, so leading zeros are lost.
If leading zeros identify a product, verify the output before using it as an ID. Fixed-length text extraction with LEFT or pattern extraction with REGEXEXTRACT can preserve text instead.
Handle Spaces and Multi-Character Delimiters
=SPLIT("Maya, Stone, Dubai",",")
Splitting on a comma does not remove the following space. The second and third results begin with spaces. To clean these pieces, use:
=ARRAYFORMULA(TRIM(SPLIT("Maya, Stone, Dubai",",")))
This returns Maya, Stone, and Dubai without the leading spaces. TRIM also collapses repeated internal spaces, so use it only when that cleanup is appropriate.
For a comma followed by a space as one complete separator, use:
=SPLIT("New York, Los Angeles",", ",FALSE)
This preserves New York and Los Angeles as two values. Without FALSE, the space inside each city name is also a separator.
Split on Several Different Characters
=SPLIT("a-b/c d","-/ ")
The result is a, b, c, and d. With the default third argument, the hyphen, slash, and space each split the text independently.
Keep Empty Fields Between Delimiters
=SPLIT("a,,b,c",",",TRUE,FALSE)
The output is a, an empty field, b, and c across four cells. Omitting the final FALSE drops the empty field, leaving a, b, and c across three cells.
Keeping empty fields matters when the second position represents a missing value, such as a middle name. Otherwise, later values shift into the wrong columns.
Split a Whole Column and Skip Blank Rows
Enter this dataset starting in A12. Leave cells marked “(blank)” empty.
| Color pairs |
|---|
| red,blue |
| green,yellow |
| (blank) |
| black,white |
=ARRAYFORMULA(IF(A13:A16="","",SPLIT(A13:A16,",")))
Enter the formula in an empty area with four rows and two columns available. It returns red/blue, green/yellow, a blank row, and black/white.
The IF test prevents an empty source from producing #VALUE!. ARRAYFORMULA applies SPLIT to each input row. Use a bounded range so the output does not occupy unnecessary rows.
Other Google Sheets articles you may also like