SPLIT function in Google Sheets
Divides text around a specified character or string, and puts each fragment into a separate cell in the row.
=SPLIT(text, delimiter, [split_by_each], [remove_empty_text])SPLIT syntax and parameters
Four arguments, two required.
- textstringRequired
The text to divide.
- delimiterstringRequired
The character or characters to use to split text. By default, each character in delimiter is considered individually, e.g. if delimiter is "the", then text is divided around the characters "t", "h", and "e". Set split_by_each to FALSE to turn off this behavior.
- split_by_eachbooleanOptional
[ OPTIONAL - TRUE by default ] - Whether or not to divide text around each character contained in delimiter.
- remove_empty_textbooleanOptional
[ OPTIONAL - TRUE by default ] - Whether or not to remove empty text messages from the split results. The default behavior is to treat consecutive delimiters as one (if TRUE). If FALSE, empty cells values are added between consecutive delimiters.
SPLIT examples
Formulas you'll actually reuse.
Just the second segment of a code like NYC-10422-A:
=INDEX(SPLIT(A2, "-"), 2)Result
"10422"Split on the whole “, ” string rather than on each character (split_by_each = FALSE):
=SPLIT(A2, ", ", FALSE)
SPLIT in Excel
No direct equivalent — here's the way around.
Try SPLIT in the playground
Edit the example — nothing to install.
Preloaded with the SPLIT formula from Example 1 — change anything and watch it respond.
SPLIT errors
What they mean — and the fixes.
#REF!The pieces would spill over non-empty cells to the right — clear them, or wrap in INDEX to pick one piece.
Related functions
More ways Google Sheets gets this done.
- ARABICComputes the value of a Roman numeral.TextExcel
- CHARConvert a number into a character according to the current Unicode table.TextExcel
- CLEANReturns the text with the non-printable ASCII characters removed.TextExcel
- CODEReturns the numeric Unicode map value of the first character in the string provided.TextExcel
- CONCATENATEAppends strings to one another.TextExcel
- DOLLARFormats a number into the locale-specific currency format.TextExcel