Sign in

Docs Help



Functions: SPLIT function

Print

The SPLIT function takes two arguments (the first is a string, and the second is a delimiter) and tokenizes the string using the delimiter.

The delimiter has some restrictions: it can't be a number or date, but can be anything that would be parsed as a string in your system. For example, things like "," or ";" or even characters like "a" will work.

  • The delimiter and string can't be null or empty strings (invalid arg is returned).
  • If the delimiter doesn't appear in the string, the whole string is returned.
  • The function takes two args, if one or both are missing or too many args are entered in, you'll get a 'incorrect number of args' error.

So, some examples are:

A1 A1 B1
=SPLIT("hello!world", "!") --> hello world

A1 A1
=SPLIT("hello", ",") --> hello (This one returns the same string as before because the delimiter doesn't appear in the string

A1 A1 B1 C1 D1 E1
=SPLIT("1;2;3;4;5", ";") --> 1 2 3 4 5

A5=hi there
A6 A6 B6
=SPLIT(A5, " ") hi there

Visit our function list for a list of currently supported functions.
Was this information helpful?

Show others how you're using Google Spreadsheets functions. Create a template and submit it to the Google Docs template gallery.

Adding Docs to a Website

Sounds great! Tell me more.