Blog

SPLIT Function in Google Sheets

The SPLIT function in Google Sheets is used to divide a text string (or value) around a given delimiter, and output the separate pieces into their own cells.

SPLIT Function Examples

Let’s see a simple example using SPLIT to separate a list of names in cell A1:

Split Function Name Example

This simple SPLIT formula will separate these names, using the comma as the separator:

=SPLIT(A1,",")

The result is 5 cells, each containing a name. Note that one cell looks blank because the text string in cell A1 has two adjacent commas with a space between them. The “space” is interpreted in the same way as the names and contained in the output:

Split Function Name Example

Now watch what happens if we include a space in the delimiter, i.e. ", "

=SPLIT(A1,", ")

The function splits on the comma "," and on the space " ", so the name “Mary Jo” split in two:

Undesirable behavior with SPLIT formula

This is probably not the desired behavior.

The third argument is an optional TRUE or FALSE that determines whether SPLIT considers each individual character of the delimiter (TRUE) or only the full combination as the separator to use (FALSE).

In our example, adding FALSE ensures that it only considers the combined comma/space string as the delimiter:

=SPLIT(A1,", ", FALSE)

And the output looks like this:

Split names in Google Sheets

There is a fourth argument too, which is optional and takes a TRUE/FALS value. It determines whether to remove blank cells or not in the output.

To illustrate this, consider this arrangement of data separated by semi-colons. Note the presence of two adjacent semi-colons with no data between them:

Split Formula Fourth Argument

The fourth argument determines whether to show or hide the blank cell caused by the two adjacent semi-colons.

To keep the blank cells, add FALSE as the fourth argument:

=SPLIT(A2,",", TRUE, FALSE)

SPLIT Function in Google Sheets: Syntax

=SPLIT(text, delimiter, [split_by_each], [remove_empty_text])

It takes 4 arguments:

text

This is the text string or value in the cell that you want to split. It can also be a reference to a cell with a value in, or even the output of a nested formula, provided that output is a string or value and not an array.

delimiter

The character or characters used to split the text. Note that by default, all characters are used in the division. So a delimiter of “the” will split a text string on “the”, “he”,”t”,”h”,”e” etc.

This behavior can be controlled by the next argument:

split_by_each

This argument is optional and takes a TRUE or FALSE value only. If omitted, it’s assumed to be TRUE.

The TRUE behavior splits by individual characters in the delimiter and any combination of them. The FALSE behavior does not consider the characters separately, and only divides on the entire delimiter.

remove_empty_text

The fourth and final argument is optional and takes a TRUE or FALSE value only. If omitted, it’s assumed to be TRUE.

It specifies what to do with empty results in the SPLIT output. For example, suppose you’re splitting a text string with a "," and your string looks like this: “Ben,Bob,,Jenny,Anna”

Between the names Bob and Jenny are two commas with no value between them.

Setting this final argument of the SPLIT function to FALSE results in a blank cell in the output. If this fourth argument is omitted or set to TRUE, then the blank cell is removed and “Bob” and “Jenny” appear in adjacent cells.

SPLIT Function Notes

  • Delimiters in SPLIT are case sensitive. So “t” only splits on lower-case t’s in the text
  • The SPLIT function requires enough “space” for its output. If it splits a text string into 4 elements then it requires 4 cells (including the one the formula is in) on that row to expand into. If there is already data in any of these cells, it does NOT overwrite it but instead shows a #REF! error message
  • You can input a range as the first argument to the SPLIT function, but it requires an Array Formula wrapper to work
  • The output from the SPLIT function is an array of values that can be passed as the input into another formula, which may require the use of the Array Formula

Alternative Split Method

There’s an alternative way to split values in a Google Sheet.

Under the Data menu, there’s a feature called “Split text to columns” which will separate single columns into multiple columns, based on the delimiter you specify.

It’s a quick and easy way to split text.

Note that it overwrites existing data in your Sheet if the split columns overlap with any existing data.

Split function alternative

SPLIT Function Template

Click here to open a view-only copy >>

Feel free to make a copy: File > Make a copy…

If you can’t access the template, it might be because of your organization’s Google Workspace settings. If you click the link and open it in an Incognito window you’ll be able to see it.

You can also read about it in the Google documentation.


Advanced Examples of the SPLIT Formula in Google Sheets

Extract The N-th Word In A Sentence

You can wrap the SPLIT function output with an INDEX function to extract the word at a given position in a sentence. E.g. to extract the 4th word, use this formula:

=INDEX(SPLIT(A1," "),4)

Extract Nth Word in Google Sheets

If you combine this with a drop down menu using data validation, you can create a word extractor:

extract Nth Word Data Validation

Alphabetize Comma-Separated Strings With The SPLIT Function in Google Sheets

Suppose you have a list of words in a single cell that you want to sort alphabetically:

Formula Challenge 3

This formula will rearrange that list alphabetically:

=JOIN(",",SORT(TRANSPOSE(SPLIT(A1,","))))

It splits the string of words, applies the TRANSPOSE function to convert into a column so it can be sorted using the SORT function, and then recombines it with the JOIN function.

Formula Challenge 3 Solution

Read more in Formula Challenge #3: Alphabetize Comma-Separated Strings.

Splitting and Concatenating Strings

The SPLIT is useful in more advanced formulas as a way to divide an array into separate elements, do some work on those elements (e.g. sort them) before recombining them with another function, like the JOIN function.

For example, this array formula will add surnames to a list of first names in a cell:

=ArrayFormula(TRIM(JOIN(", ",SPLIT(A2,", ")&" Smith")))

which looks like this in your Google Sheet:

Split Function In Google Sheets To Add Surnames

Using the onion framework to analyze this formula, starting from the innermost function and working out, it splits the text string, joins on the surname “Smith”, trims the excess trailing space with the TRIM function, and finally outputs an array by using the Array Formula.

Find Unique Items In A Grouped List

Suppose you want to find unique values from data that looks like this:

Split Function To Find Uniques

You want to extract a unique list of items from the column containing grouped words, which are separated by commas.

Use this formula to extract the unique values:

=ArrayFormula( QUERY( UNIQUE( TRIM( FLATTEN( SPLIT(A2:A100,",")))),"where Col1 is not null order by Col1"))

Read more about this technique in this post: Get A Unique List Of Items From A Column With Grouped Words

Unpivot Technique

The SPLIT function in Google Sheets is used in a number of the complex IMPORT formulas for retrieving social media statistics into your Google Sheet.

The SPLIT function was combined with the FLATTEN function in this exceedingly wacky unpivot formula in Google Sheets:

=ArrayFormula(SPLIT(FLATTEN(B1:E1&"🦊"&A2:A4&"🦊"&B2:E4),"🦊"))

All in all, SPLIT is a useful function!

5 Insights From Taking A Live Cohort-Based Course (And How I’m Applying Them To My Own)

Cohort-based course transformation
Sketching Billy Broas’ Bridge of Transformation model for my cohort-based course!

I recently joined 40 other entrepreneurs for the first cohort of Billy Broas’ new live online cohort-based course, the Keystone Accelerator.

It’s an 8-week program covering how to market and launch cohort-based courses (CBCs).

Cohort-based courses are online courses where a group of students join at the same time and progress through the course together. Typically, students in a CBC meet online via Zoom for interactive sessions and work on course materials between sessions.

They’re fundamentally different to self-paced video courses because the emphasis shifts from being content-centric to being community-centric.

Students get the benefit of accountability, a peer group and expert teacher(s) for questions, and a community in which to celebrate wins and share challenges. CBC’s provide structure and guidance for students. Consequently, they have much higher completion rates than self-paced courses and better outcomes for students.

I joined this Keystone cohort course because I’m creating my own live training course and I wanted to learn from the experts on how to build, market and sell these types of courses.

We met twice a week for 90 minutes over Zoom – with participants calling in from all over the world – to learn an education-based marketing framework. In addition, I joined weekly peer coaching groups to brainstorm ideas and critique each other’s work in a safe environment.

Here are my top five takeaways from taking a cohort-based course that I want apply to my own course, the Pro Sheets Accelerator:

1. It Is Possible To Have Transformative Experiences Online

I’d never done a live cohort-based course before Keystone. I’d experienced plenty of webinars, in-person courses and self-paced video courses.

But this was different.

Keystone was unlike any other learning experience I’ve had.

It combined the content of an on-demand video course with the accountability, rapid feedback and community of an in-person event.

Accountability pushes you to show up and do the work.

Rapid feedback means you don’t get stuck for long periods and learn quickly from your mistakes.

Community provides a safe space to share wins and challenges and make new friends.

Combining these three factors with world-class content is the best way to facilitate the student transformation.

For first cohort of the Pro Sheets Accelerator, I want to foster a really strong community to maximize these benefits.

If you join, you’ll be in a group of 30 – 40 students, with a private course forum, peer groups and office hours, in addition to the main teaching sessions.

2. The Connections You Make Are As Valuable As The Course Content

I joined a group of 40 super smart, motivated entrepreneurs, all building their own live training courses in wildly different industries.

Some were earlier in their journeys than me, some were further along.

Together, the breadth of experiences, ideas and insights far surpassed what I, as an individual, could have achieved.

Truly a case of the whole being greater than the sum of its parts. 

I learned a lot from the peer coaching sessions, both from giving and receiving feedback. Seeing how other people solve problems, how they think and how they approach opportunities and challenges, was hugely valuable.

Like a wifi network that gets stronger as more nodes are added and interlinked, the new connections you make through a CBC improve your chances of success with your own business.

3. Learning With Others Is More Fun Than Learning Alone

I’m a firm believer that education should be enjoyable and that you learn best when you’re having fun. We should take inspiration from young children who learn through play.

If it’s enjoyable, you’re more likely to succeed.

Instead of watching the clock and counting down until the end of a boring lecture, you’re emotionally present and absorbing information. You’re in the zone of proximal development.

In the past year, we’ve all been starved of human connection and friendship.

Although CBCs are online, you’re still going through an intense shared experience with other folks.

Naturally friendships form as people get to know each other and become more comfortable. You begin to see beneath the surface and really learn from each other.

Pro Sheets Accelerator will be a fun experience. My goal is for everyone to enjoy the course first and foremost.

4. The Tangential Ideas Are Just As Valuable As The Core Content

The Keystone course I participated in is a marketing course. Its promise is that it’ll teach you how to market and sell cohort-based courses.

But along the way, I picked up tons of other ideas. Ideas that weren’t on the syllabus but arose through digressions, chats with peers or from surprise bonus sessions with guest experts.

Simply from being part of this cohort-based course, I learned about how to run one. I saw first hand how many moving pieces there are and why you need help to run one. Everything from the first onboarding call through to how to structure the live Zoom calls and exercises.

Tiago Forte, one of the world’s leading experts on CBCs who runs the hugely successful Building A Second Brain course, joined this Keystone course and added his perspective to the program.

In addition, we had workshops on the operations side of running CBCs from course director Will Mannon, and on how to create engaging experiences for our students from learning designer Andrew Barry. Both of these added valuable insights outside of the marketing curriculum of the main course.

Encouraging curiosity, fostering peer-led learning and surprising students with guest speakers are all great ways to add value to a CBC.

I plan to implement all of these in the Pro Sheets Accelerator course.

5. Less Is More in Cohort-Based Courses

When it comes to content, less is more.

What this means in practice is that the emphasis of the course shifts from cramming in as much content as possible (a traditional signal of value) to focusing on students’ transformational learning experiences.

The goal of a CBC is for your students’ life to change. You’re guiding them across the bridge from their current status quo to the new, better life.

For example, in the Keystone course, I came away with a much deeper understanding of CBCs and education based marketing. I now have a playbook I can apply to my own business.

What I don’t have is a library of 300 videos on marketing, which I would never have the time to watch, much less implement.

This realization with regards to content – that less is more – was a key shift I noticed in myself during this Keystone course.

For the Pro Sheets Accelerator cohort-based course, my original plan was to focus on making it as comprehensive as possible, covering Google Sheets and Apps Script from top to bottom.

It would have been impossible to achieve and unmanageable for students.

Now, my plan is to focus on two areas:

  1. Developing a framework and skillset for doing data analysis with Google Sheets, and
  2. Automating that framework

Yes, they’re still big topics, but they’re focussed. I can build a syllabus that goes deep into these subjects and delivers huge value, in a way that won’t overwhelm students.

The material will be relevant. Students will learn just enough to experience a transformation but not too much that it gets diluted.

Applying These Lessons To Pro Sheets Accelerator

It’s been 4 years since I launched my first online course, How To Build Dashboards in Google Sheets.

Since then, over 40,000 students from 1,000s of organizations have registered for one or more of my online courses.

All of these courses are self-serve video courses.

Now it’s time to add a new experience-based course into the mix, as the next evolution of my education business.

I’m building a cohort-based course called Pro Sheets Accelerator, which will teach you how to leverage the power of data and automation in Google Sheets to grow your business and career.

The first cohort begins at the end of April. I’m super excited to bring together a group of Sheets aficionados for a transformative learning experience. Join us!

PI Function in Google Sheets And Other Fun π Facts

The PI function in Google Sheets returns the value of the mathematical constant pi (Ï€) to 9 decimal places: 3.141592654

Pi is defined as the ratio of a circle’s circumference to its diameter.

Pi is denoted by the Greek lowercase letter π

PI Function in Google Sheets: Syntax

=PI()

There are no arguments. If you put anything between the brackets the formula will give you an error.

Continue reading PI Function in Google Sheets And Other Fun π Facts

INDIRECT Function in Google Sheets

The INDIRECT function in Google Sheets is used to convert text strings into valid cell or range references.

For example, the INDIRECT function will convert the text string “A1” into the cell reference A1. The formula is:

=INDIRECT("A1")

which is equivalent to this formula:

= A1

It gives the answer 10 in the following example because that’s the value in cell A1:

Indirect Function In Google Sheets

Continue reading INDIRECT Function in Google Sheets