How to Split a Cell in Google Sheets (9 Quick Methods)

We often require to split appended values from a cell. For example, we may want to separate URLs and email extensions or extract known values from a string. Here, I’ll demonstrate 9 quick methods to split a cell in Google Sheets. Here is an overview of our required result. We have used the SPLIT function to separate a cell around the Space (“ ”) delimiter.

An overview of the required result


 A Sample of Practice Spreadsheet

You can copy our practice spreadsheets by clicking on the following link. The spreadsheet contains an overview of the datasheet and an outline of the demonstrated examples to split a cell in Google Sheets.


9 Quick Methods to Split a Cell in Google Sheets

First, let’s look at the dataset we’ll use for most of this article. The dataset contains a list of names that we want to split into two different cells. Now, let’s get started.

Dataset used for demonstrating how to split a cell in Google Sheets


1. Using Split Text to Columns Feature

To start, let’s split the required cells without applying any formula. We can use the Split Text to Columns feature to separate values around a single delimiter. There are two ways to apply the Split Text to Columns feature as described in the sections below.


1.1 Applying from Clipboard Menu

First, we’ll apply the Split Text to Column feature from the clipboard menu options. The clipboard menu is generated while applying the Paste command. And then the Split Text to Columns command can put the space-separated values into different columns.

Steps:

  • Firstly, select the range B5:B14 and then copy the range by using the keyboard shortcut CTRL+C.

Copying the required range using CC keyboard shortcut

  • Afterward, select Cell C5 and paste the range using the keyboard shortcut CTRL+V. At this time, the clipboard for paste formatting will be visible. Click on the Clipboard menu.

Applying paste command for the copied range to generate clipboard menu

  • As soon as you click on the Clipboard menu, a list of options will appear. Select the Split Text to Columns feature from the list.

Selecting Split Text to Columns feature from clipboard menu

  • At this time, a new clipboard will appear, where you can select the separator to execute the Split Text to Columns feature. Click on the Separator clipboard.

Generating a new clipboard for choosing separator

  • A list of separators will be visible now. We’ll select the Space option from here. You can choose the separator you require. You can also insert a custom separator if it isn’t available in the appeared list.

Choosing Space (" ") as separator to split a cell in Google Sheets

  • As soon as you select the Space option as the separator for the Split Text to Columns command, the copied values will be split into required columns.

Final output after applying Split Text to Column feature from Clipboard menu


1.2 Implementing from Data Ribbon

In lieu of using the clipboard menu, we can also perform the Split Text to Columns command from the Data ribbon. Keep reading to learn how.

Steps:

  • Follow the first two steps of the previous method to copy and paste the range B5:B14 to C5:C14 by using the Ctrl+C and Ctrl+V keyboard shortcuts.
  • Then, select the range C5:C14 and go to the Data ribbon.
  • From the appeared options, select Split Text to Columns feature.

Applying Split Text to Columns from Data ribbon

  • A clipboard will appear at this time, where you can select the separator to execute the Split Text to Columns feature.

A clipboard is generated to select a separator to execute Split Text to Columns feature

  • A list of separators will be visible when you click on the Separator clipboard. We’ll select Space as a separator from there. This will provide us with the required result like the following.

Final result after choosing Space (" ") as separator Split Text to Columns command


2. Employing SPLIT Function

Instead of using the Split Text to Columns command to paste space or any other delimiter-separated values we can use the SPLIT function to allocate them in adjacent columns. The SPLIT function is an exclusive function in Google Sheets.

Steps:

  • Firstly, activate Cell C5 by double-clicking on it.
  • Then, type in the following formula-
=SPLIT(B5," ","")
  • Afterward, press the Enter key to get the required output.

Employing SPLIT function to Split a Cell in Google Sheets

  • Now, select Cell C5 again and then hover the mouse pointer above the bottom-right corner of the selected cell.
  • The Fill Handle icon will be visible at this time.
  • Finally, use the Fill Handle icon to copy the formula to other cells of Column C.

Using Fill Handle tool to copy the formula across a column

  • The final output looks like the following after using the Fill Handle tool.

Final Output after Employing SPLIT function and using Fill Handle tool


3. Joining ARRAYFORMULA and SPLIT Functions

We can join the ARRAYFORMULA function with the SPLIT function to get the same result as the previous method without using the Fill Handle tool. The SPLIT function is a non-array function. Hence, we require joining the ARRAYFORMULA function with it if we want the SPLIT function to deal with an array.

Steps:

  • Activate Cell D5 by selecting it first and then using the function key F2.
  • Afterward, insert the following formula-
=ARRAYFORMULA(SPLIT(B5:B14," ",""))
  • Finally, get the required output by pressing Enter key. And as you can see, we have performed the splitting text operation without using the Fill Handle tool.

Joining ARRAYFORMULA and SPLIT Functions to Split cells from a range in Google Sheets

Formula Breakdown

  • SPLIT(B5:B14,” “,””)

The SPLIT function divides the texts in each cell of range B5:B14 into separate cells of adjacent columns around the space (“ ”) delimiter.

  • ARRAYFORMULA(SPLIT(B5:B14,” “,””))

The ARRAYFORMULA function helps the non-array function SPLIT to deal with and display an array.


4. Merging TRANSPOSE and SPLIT Functions

The SPLIT function usually separates values horizontally (adjacent cells of a row). But sometimes, we may require splitting values vertically (adjacent cells of a column) in Google Sheets. We can combine the TRANSPOSE function with the SPLIT function in such scenarios. Let’s have a look at the following dataset. We have the names of the members of the 3 teams. We want to split these names vertically.

Dataset for Demonstrating Vertical Split of a Cell in Google Sheets

Steps:

  • First, select Cell B7 and then type in the following formula-
=TRANSPOSE(SPLIT(B5,", ",""))
  • Next, press the Enter key to get the required result.

Merging TRANSPOSE and SPLIT functions to split a cell vertically in Google Sheets

Formula Breakdown

  • SPLIT(B5,”, “,””)

The SPLIT function first divides the text in Cell B5 into separate cells of adjacent columns around the “, ” delimiter.

  • TRANSPOSE(SPLIT(B5,”, “,””))

Later, the TRANSPOSE function converts the rows into columns and columns into rows.

  • Now, select Cell B7 again and then hover the mouse pointer above the bottom-right corner of the selected cell.
  • The Fill Handle icon will be visible at this time.
  • Finally, use the Fill Handle icon to copy the formula to other cells of Row 7.

Using Fill Handle tool to copy the formula across a row

  • The final output looks like the following after using the Fill Handle tool.

Final output after merging TRANSPOSE and SPLIT functions


5. Combining INDEX and SPLIT Functions

Sometimes, we may require only a specific part of a string. Instead of splitting the entire text, we can simply extract the required part by combining the SPLIT and INDEX functions. We’ll use the following dataset for this example where we’ll extract a specific space-separated word from the data based on an index from a drop-down list.

Dataset for combining INDEX and SPLIT functions to Extract Nth word from a string

Steps:

  • In the beginning, click on the drop-down icon of the Index column.

Selecting the Index of the Word to be extracted

  • At this time, a list of index options will appear. Select the index you require.

List of Index options in the drop-down list

  • Now, select Cell D5 and type in the following formula-
=INDEX(SPLIT(B5," ",""),C5)
  • Finally, press Enter key to get the required result.

Combining INDEX and SPLIT functions to extract Nth word from a string

Formula Breakdown

  • SPLIT(B5,” “,””)

First, the SPLIT function returns a range by dividing each space-separated value into different cells.

  • INDEX(SPLIT(B5,” “,””),C5)

Later, the INDEX function returns the content of the cell in the range specified by the SPLIT function based on the offset index provided in Cell C5.

  • Now, if we change the index, the extracted word changes automatically.

Changing Index to Extract another Word from the string


6. Uniting ARRAYFORMULA, JOIN, TRIM, and SPLIT Functions

The SPLIT function can help us to add any specific suffix or prefix to a set of delimiter-separated values when it is united with the ARRAYFORMULA, JOIN and TRIM functions. We’ll demonstrate this example using the following dataset.

Dataset for Adding Suffix or Prefix to a String by uniting ARRAYFORMULA, JOIN, TRIM and SPLIT functions

Steps:

  • First, activate Cell D5 by double-clicking on it.
  • Afterward, insert the following formula-
=ARRAYFORMULA(TRIM(JOIN(", ",SPLIT(B5,", ")&" "&C5)))
  • Lastly, get the required result by pressing the Enter key from your keyboard.

Final output after adding suffix to text values in a string by uniting ARRAYFORMULA, JOIN, TRIM and SPLIT functions

Formula Breakdown

  • SPLIT(B5,”, “)

The SPLIT function first divides the texts in Cell B5 into separate cells of adjacent columns around the “, ” delimiter.

  • JOIN(“, “,SPLIT(B5,”, “&” “&C5)

Afterward, the JOIN function appends each split value with a space (“ ”) and value stored in Cell C5 around the “, ” delimiter.

  • TRIM(JOIN(“, “,SPLIT(B5,”, “)&” “&C5))

Later, the TRIM function removes any leading, trailing, and repeated spaces in the text.

  • ARRAYFORMULA(TRIM(JOIN(“, “,SPLIT(B5,”, “)&” “&C5)))

The ARRAYFORMULA function helps to deal with and display an array. Without this, only the first Location-Region value will be shown.


7. Merging SORT, TRANSPOSE, and SPLIT Functions

We can also split a cell vertically to sort the separated values in alphabetical order in Google Sheets. For this, we need to join the SORT, TRANSPOSE, and SPLIT Functions. We’ll use the following dataset to demonstrate this example. We have a list of “, ” delimiter-separated values in a cell that we’ll split and rearrange in alphabetical order.

Dataset for Rearranging words in alphabetical order

Steps:

  • Select Cell B8 first and insert the following formula-
=SORT(TRANSPOSE(SPLIT(B5,", ")))
  • Now, get the required output by pressing the Enter key.

Merging SORT, TRANSPOSE and SPLIT functions to rearrange words in alphabetical order

Formula Breakdown

  • SPLIT(B5,”, “)

The SPLIT function first divides the text in Cell B5 into separate cells of adjacent columns around the “, ” delimiter.

  • TRANSPOSE(SPLIT(B5,”, “))

Later, the TRANSPOSE function converts the rows into columns and columns into rows. Since the SORT functions require a column to rearrange cells and the SPLIT function returns a row with separated values, we require the TRANSPOSE function.

  • SORT(TRANSPOSE(SPLIT(B5,”, “)))

Finally, the SORT function rearranges the rows of a given array or range by the values.


8. Joining QUERY, ARRAYFORMULA, and SPLIT Functions

Let’s have a look at the following dataset. The dataset contains several persons’ first and last names and job statuses in a few cells. Now, if we apply the SPLIT function here, we’ll get only first names and last names for a few cells. And in other cells, we’ll also get the job status along with first names and last names. Now, if we only require the first and last names, then we can combine the QUERY function with it to return only first and last names. We’ll also join the ARRAYFORMULA function here to get rid of using the Fill Handle icon. Now, let’s get started.

Dataset for demonstrating how to exclude non-required parts from a string while applying SPLIT function

Steps:

  • Firstly, select Cell C5.
  • Afterward, type in the following formula-
=QUERY(ArrayFormula(SPLIT(B5:B14," ")),"Select Col1, Col2")
  • Finally, get the required output by pressing the Enter key.

Final result after joining QUERY, ARRAYFORMULA and SPLIT functions to allow limited cells while splitting a cell in Google Sheets

Formula Breakdown

  • SPLIT(B5:B14,” “)

First, the SPLIT function divides the texts in each cell of range B5:B14 into separate cells of adjacent columns around the space (“ ”) delimiter.

  • ARRAYFORMULA(SPLIT(B5:B14,” “))

Here, the ARRAYFORMULA function helps the non-array function SPLIT to deal with and display an array.

  • QUERY(ARRAYFORMULA(SPLIT(B5:B14,” “)),”Select Col1, Col2”)

Finally, the QUERY function runs a Google Visualization API Query Language query across the range returned by the SPLIT function and selects only Column 1 and Column 2 from the range.


9. Combining SPLIT, REGEXREPLACE, and CHAR Functions

We can combine the SPLIT, REGEXREPLACE, and CHAR functions to separate a word into letters and characters. Splitting up a word into its individual characters may sound quite simple, but it can be a complex approach when automating this process in an application like Google Sheets. We’ll use the following dataset for this example. Now,  follow the simple steps below to execute this operation.

Dataset for demonstrating how to split a cell with a word into letters or characters in Google Sheets

Steps:

  • To start, select Cell D5.
  • Now, type in the following formula-
=SPLIT(REGEXREPLACE(REGEXREPLACE(B5&"","(?s)(.{1})","$1"&CHAR(127)),"'","''"),CHAR(127))
  • Lastly, press Enter key to get the required result.

Combining SPLIT, REGEXREPLACE and CHAR functions to split a word into letters

Formula Breakdown

  • CHAR(127)

The CHAR(127) works as a delimiter. In ASCII it is known as the Delete Character. It is virtually invisible and highly likely not to show up in any regular texts or strings.

  • REGEXREPLACE(B5&””,”(?s)(.{1})”,”$1″&CHAR(127))

The inner REGEXREPLACE function replaces every character of the word with itself and combines it with a special character CHAR(127). A regular expression flag (?s) is also included that allows the dot (.) to match characters and new lines if there are multiple lines in the reference cell.

  • REGEXREPLACE(REGEXREPLACE(B5&””,”(?s)(.{1})”,”$1″&CHAR(127)),”‘”,”””)

The outer REGEXREPLACE function handles any single quotes that might appear in the reference text. It replaces single quotes () with double single quotes (‘’).

  • SPLIT(REGEXREPLACE(REGEXREPLACE(B5&””,”(?s)(.{1})”,”$1″&CHAR(127)),”‘”,”””),CHAR(127))

The SPLIT function here uses CHAR(127) as a delimiter to separate the characters of the word here.


How to Split a Cell Around Multiple Delimiters in Google Sheets

The SPLIT function can only handle one delimiter-separated value. So, how can we deal with multiple delimiter-separated values? We can combine the SPLIT and REGEXREPLACE functions in such scenarios.  We’ll use the following dataset for this example. The dataset contains a list of first names, last names, origin countries, professions, and ages for a list of people separated by a space (“ ”), a comma (“,”), a hyphen (“-”) and a double backslash (“\\”) delimiter. Now, let’s perform the splitting operation.

Dataset to demonstrate how to split a cell based on multiple delimiter in Google Sheets

Steps:

  • Firstly, select Cell D5.
  • Afterward, insert the following formula-
=SPLIT(REGEXREPLACE(B5,",|-|\\"," ")," ","")
  • Later, get the required output by pressing the Enter key.
  • Finally, Finally, use the Fill Handle icon to copy the formula to other cells of Column D.

Final Output after joining SPLIT and REGEXREPLACE functions to split a cell around multiple delimiters in Google Sheets

Formula Breakdown

  • REGEXREPLACE(B5,”,|-|\\”,” “)

The SPLIT function can’t actually divide texts based on multiple delimiters. Hence, the REGEXREPLACE function is used for substituting every other delimiter for a single delimiter. Here, we have substituted every other delimiter with spaces (“ ”).

  • SPLIT(REGEXREPLACE(B5,”,|-|\\”,” “),” “,””)

And now, the SPLIT function divides the space-separated values into adjacent cells of a row.


Conclusion

This concludes our article to learn how to split a cell in Google Sheets. I hope the demonstrated examples were ideal for your requirements. Feel free to leave your thoughts on the article in the comment box. Visit our website OfficeWheel.com for more helpful articles.


Related Articles for Reading

Mehrab Imtiaz

Mehrab Imtiaz

Mehrab Imtiaz is a Technical Writer for officewheel.com specializing in everything Google Sheets. Mehrab has always had a profound passion for writing and with his experience with MS Excel and Google Sheets throughout his career, it seems to be a great match when it comes to dishing out tips and tutorials for all to enjoy.

We will be happy to hear your thoughts

Leave a reply

OfficeWheel
Logo