How to Split Text to Columns Using Formula in Google Sheets

In order to properly extract meaning from the data that has been gathered, text strings must be split as a necessary first step in data analysis. For better visualization and better understanding, splitting text is also important. In this article, we have demonstrated 5 easy methods to split text to columns using formula in Google Sheets. The final output will be something like as follows:

split text to columns google sheets formula


A Sample of Practice Spreadsheet


4 Easy Methods to Split Text to Columns Using Formula in Google Sheets

We will be using the following spreadsheet as an example to describe methods in this article. The dataset represents some students’ names with their corresponding IDs. What we want to get is two separate columns containing First Name and Last Name respectively. That means we have to split those full names into two different cells.

dataset to split text to columns in google sheets


1. Using SPLIT Function

The SPLIT Formula is an amazing built-in function in Google Sheets for splitting text to columns. This function divides text around a specific character or string, and each piece is then placed into a different cell in the row. The SPLIT function can separate one text into two values as well as it can deal with multiple delimiter-separated values.


1.1 For Single Type of Delimiter

You may easily separate your data based on delimiters using Google Sheets’ SPLIT formula. If there is only one type of delimiter then it’s very simple to separate them into two columns using the formula.

Steps:

  • First, in the following dataset, select Cell D5, apply the following formula below and press Enter-
=SPLIT(C5," ")

This function will detect space between the texts in Cell D5 and will separate them into two different cells. Here, these two different cells are Cell D5 & Cell E5 respectively. The output will be as follows-

SPLIT function gives output

  • After that, use the Fill handle icon as shown in the circled portion to drag down and get the separate text strings for other full names as well.

dragging down using fill handle icon

  • Finally, the output you will get will be as follows.

final output of using the SPLIT function in google sheets


1.2 For Multiple Types of Delimiters

We often need to split texts which are with multiple types of delimiters. The SPLIT function also helps with that. Suppose, in the below spreadsheet, we want to separate all the text strings that are within the email address. The delimiters within the email address are “@” and “.”.

dataset to use SPLIT function For Multiple Types of Delimiters in google sheets

Steps:

  • Activate Cell C5, apply the following formula below and press Enter
=SPLIT(B5,"@|.","True")

We will get output horizontally as follows along row 5 within Cell range C5:E5.

inserting SPLIT function For Multiple Types of Delimiters in google sheets

  • Now, drag down using the Fill handle icon as shown in the circled portion. This will copy the formula to other cells of Column C.

dragging down to get output for other texts

  • Finally, the output will be as follows.

final result after using the SPLIT function for multiple delimiters in google sheets

Read More: How to Split Text to Columns Based on Line Break in Google Sheets


2. Combining ARRAYFORMULA and SPLIT Functions

Why do we use the ARRAYFORMULA function with other formulas or singly? Because we want to get rid of repetition. We can combine ARRAYFORMULA and SPLIT functions in Google Sheets to split text to columns avoiding repetition.

Steps:

  • First, activate Cell D5 in the following worksheet, input the formula below and press Enter-
=ARRAYFORMULA(SPLIT(C5:C13," "))

The output will be as follows-

Combining ARRAYFORMULA and SPLIT Functions to SPLIT text to columns in google sheets

Note: You don’t need to use any fill handle icon or drag down to get the output for other values because ARRAYFORMULA does it work automatically along cells which helps to avoid the repetition of multiple operations.

Formula Breakdown

  • SPLIT(C5:C13,” “)

Split the texts of the range C5:C13 text into two columns.

  • ARRAYFORMULA(SPLIT(C5:C13,” “))

Finally, ARRAYFORMULA applies the SPLIT function to every cell in the predefined range of cells.

Read More: How to Split String into Array in Google Sheets (3 Easy Methods)


Similar Readings


3. Merging ARRAYFORMULA, TRANSPOSE and SPLIT Functions

Typically, the SPLIT function divides values horizontally. However, there are situations when vertical value splitting in Google Sheets is necessary. In these circumstances, we can combine the TRANSPOSE and SPLIT functions. And to avoid repetition, we can merge ARRAYFORMULA with them as well.  Presume, in the following dataset, we want to separate first name and last name vertically.

Merging ARRAYFORMULA, TRANSPOSE and SPLIT Functions in google sheets to separate texts

Steps:

  • First, choose Cell C11, apply the formula below and press Enter-
=ARRAYFORMULA(TRANSPOSE(SPLIT(B5:B9," ")))

The output will be as follows after applying the formula.

final output after Merging ARRAYFORMULA, TRANSPOSE and SPLIT Functions in google sheets

Formula Breakdown

  • SPLIT(B5:B9,” “)

This function here separates texts within Cell range B5:B9 into two text strings based on the delimiter “ ”.

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

Next, this formula rearranges the separated data vertically.

  • ARRAYFORMULA(TRANSPOSE(SPLIT(B5:B9,” “)))

Lastly, the ARRAYFORMULA applies the combined TRANSPOSE and SPLIT functions operation to every cell in the predefined range of cells.

Read More: [Solved!] Split Text to Columns Is Not Working in Google Sheets


4. Joining INDEX and  SPLIT Functions

With the use of the INDEX function with the SPLIT function, we can separate texts one by one easily. Assume, in the following dataset, we want to separate first names first then we will separate the last names.

dataset to Join INDEX and  SPLIT Functions in google sheets

Steps:

  • First, select Cell D5, type down the below formula and press Enter-
=INDEX(SPLIT(C5," "),1)

Joining INDEX and  SPLIT Functions to split texts in google sheets

Formula Breakdown

  • SPLIT(C5,” “)

Split the text of Cell C5 into two texts and show them in two different columns as output.

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

Here, the input “1” indicates the first separated value that the SPLIT function extracted initially. Then the INDEX function will show just that value.

  • Second, activate Cell E5, apply the following formula and press Enter
=INDEX(SPLIT(C5," "),2)

Joining INDEX and  SPLIT Functions to separate texts in google sheets

Formula Breakdown

  • SPLIT(C5,” “)

Split the text of Cell C5 into two texts and display the outcome in two separate columns.

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

The 2nd separated value that the SPLIT function extracted is indicated by the input “2” in this case. The INDEX function will then display only that value.

  • Thereafter, select Cell D5 again and drag it down using the Fill handle icon as shown below.

dragging down to get output for other texts

  • This will apply the formula to the rest of the Cell range D5:D13.

result after dragging down

  • Do the same by dragging down using the Fill handle icon selecting Cell E5.
  • Finally, the output will be as follows.

final output after applying the INDEX and SPLIT formula in google sheets

Read More: How to Use QUERY with SPLIT Function in Google Sheets


How to Split Text to Columns Without Using Formula in Google Sheets

Previously, we have seen methods of splitting texts using formulas. This thing can also be done without using formulas. Suppose, in the following dataset, we want to separate the first name and last name.

Dataset to Split Text to Columns Without Using Formula in Google Sheets

Steps:

  • First, select Cell range B5:B13 and copy them using the keyboard shortcut Ctrl+C.

Copying cell ranges of texts to split them without formulas in google sheets

  • Then, paste the copied values in Cell C5 using the keyboard shortcut Ctrl+V.

pasting the copied data in a specific cell range to split them

  • After that, go to Data and select Split text to columns.

using the Split text to columns feature

  • Following this, something will appear as shown below.

using the Separator drop down menu

  • Thereafter, from that Separator drop down menu, select Space.

selecting Space from the drop down menu

  • Finally, the output will be as follows across Cell range C5:D13.

final output

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


Conclusion

This article contains the 5 easiest methods to split text to columns using formulas in Google Sheets. Hope this will help with your tasks. Visit officewheel.com to explore more relevant articles.


Related Articles

Adrey

Adrey

Hello! This is Raiyan Zaman Adrey, a fresh graduate in BSc in Civil Engineering from Bangladesh University of Engineering and Technology. From my high school I have been using Excel in which I was always interested and had fun and this led me to do more research on Excel and Google Sheets as both are kinda similar platform. I have always been enthusiastic, self-motivated, reliable and hard working person and for a long time, I am trying to improve myself more and more so that I can face any challenging situation and adapt myself to any environment.

We will be happy to hear your thoughts

Leave a reply

OfficeWheel
Logo