Gallery
Split
Share
Explore

icon picker
Split

Formula: Split()
Category: String
split.svg
Split()
Splits texts on a user-determined delimiter
It’s kind of like saying...
Hey Coda, I’m going to give you some information—can you turn it into a list with distinct items?
Split() has two parameters:
text-color (1).svg
Text

Split(Text, Delimiter)

The text you want to split.

add-white-space.svg
Delimiter

Split(Text, Delimiter)

What you want to split the text on.

What Is This Formula?

Split() allows you turn information into lists, or modify how current list items are defined. Try it out below—type any sentence into the yellow box and watch how it turns your sentence into a list of words and characters.
Sentence
1
Thank you for instructing in this course!
There are no rows in this table
List of
7
words:
Thankyouforinstructinginthiscourse!
List of
41
characters:
Thank you for instructing in t Show 11 more
Split() will allow you to take far more control over the data in your documents and do some wildly wonderful things.
Here’s some test text:
Coda is a no-code tool that lets you do almost anything
Now define your own delimiter. Try these 5 as an example in the box below:
A blank space (just press the space bar on your keyboard)
The letter a
The hyphen symbol: -
The letters cod
The letters Cod
Delimiter:
Output:
Coda is a no-code tool that le Show 25 more
Notice what it’s doing. When Split() changes text into a list there a couple things to be aware of:
It takes the character and deletes it from the list. When you used the letter a as your delimiter it turned the sentence into a list without any a characters in it whatsoever.
Your delimiter is case-sensitive. Cod and cod split your sentence in different ways. If you want to get around this you can use the Lower() formula to change everything to lowercase.

Practical Use Cases

So why is this useful? Let’s look at just a couple use-cases.

1. Turning a list of text into rows

Sometimes you may want to input a large amount of data into distinct rows. If the incoming data is in an un-friendly format that doesn’t allow you to copy/paste into rows, you can use a combination of Split() and ForEach() to turn that information into rows.

Take for example this list of US States:
Alaska,Alabama,Arkansas,American Samoa,Arizona,California,Colorado,Connecticut,Delaware,Florida,Georgia,Guam,Hawaii,Iowa,Idaho,Illinois,Indiana,Kansas,Kentucky,Louisiana,Massachusetts,Maryland,Maine,Michigan,Minnesota,Missouri,Mississippi,Montana,North Carolina,North Dakota,Nebraska,New Hampshire,New Jersey,New Mexico,Nevada,New York,Ohio,Oklahoma,Oregon,Pennsylvania,Puerto Rico,Rhode Island,South Carolina,South Dakota,Tennessee,Texas,Utah,Virginia,Virgin Islands,Vermont,Washington,Wisconsin,West Virginia,Wyoming
We can turn all that information into rows with the click of a button:
Turn text into Rows
Heres the formula that does it
image.png
State List

2. Find Word Count

Type in a sentence into the yellow box below and see its word count outputted to the right
Sentence
Word Count
1
This is a sentence with some words in it
You sentence has 9 words
There are no rows in this table

3. Extract First and Last Names

Split() is a very handy formula when you want to extract first and last names from a column that contains only full names. There are a couple different ways you can find first and last names. One is simple and will only catch simple cases, and the other is a little more complex but should work in far more cases. However, they both use Split().
We recommend using the complex way to more reliably catch first-names. Notice how the red row below is an individual with two first names. In cases like this you will need the more complex method.
First and last names
Full Name
Simple First
Simple Last
Complex First
Complex Last
1
Scott Weir
Scott
Weir
Scott
Weir
2
Alicia Alvarez Mon-Zeid
Alicia
Mon-Zeid
Alicia Alvarez
Mon-Zeid
3
Luke Skywalker
Luke
Skywalker
Luke
Skywalker
There are no rows in this table

Done
Count the number of emails in a string of text
Done
Find the opening hours of organizations on Tuesday
Done
Done

Share
 
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.