Locked lesson.
About this lesson
Exercise files
Download this lesson’s related exercise files.
05-03-Methods for Splitting Data-Start.xlsx12 KB 05-03-Methods for Splitting Data-Complete.xlsx
13.1 KB 5.03 methods-for-splitting-data - Exercise.docx
43.2 KB Exercise - Methods for Splitting Data.xlsx
10.7 KB 5.03 methods-for-splitting-data - Exercise solution.docx
127.9 KB Exercise Solution - Methods for Splitting Data.xlsx
12.1 KB
Quick reference
Methods for Splitting Data
Learn how to split data across cells using three methods: Flash Fill, Text to Columns, and Text Functions.
When to use
We use this method whenever we want to take data from one cell and split it across other cells.
Instructions
There are several methods we can use to split data across cells.
Split Data: Flash Fill
The first method we can use is Flash Fill.
In this example, we need to split the name and extension number in column A across the cells in columns B, C, and D.
- Type the first one as an example.
- Click anywhere in column B and press CTRL+E.
- Repeat this for the other columns.
Split Data: Text to Columns
We can use the Text to Columns utility in Excel to split text across columns. Text to Columns uses the delimiter we specify to know where to split the data.
- Select the data in column A.
- From the Data tab, in the Data Tools group, click Text to Columns.
- Choose Delimited.
- Click Next.
We need to specify what separates the first name, last name, and Ext number in column A.
- Choose Space from the list.
- Click Next.
- In the Destination field, click the cell where you want to first item to go.
- Click Finish.
Split Text: Text Functions (LEFT, RIGHT, MID, FIND)
We can use Excel Text Functions to split data across columns.
In this example, we need to separate out the First Name, Full Name, and Ext No.
The LEFT Function
We can use the LEFT function to extract the first name from cell B7.
The LEFT function has two arguments:
text - the cell where the text is contained.
num_chars - the number of characters from the left of the cell we want to extract.
The formula below will extract the first 4 characters from cell B7.
This will work for the first name in the list as it has 4 characters. However, when we copy the formula down, it doesn't work because the names are inconsistent lengths.
Instead, we can modify the formula so it finds the first space in the name and extracts everything before.
- Press Enter and copy the formula down.
We can also use the LEFT function to extract the full name from column B. We can do this by finding the first bracket and extracting everything to the left.
The RIGHT Function
The RIGHT function is similar to LEFT except that it extracts characters from the right-hand side of the cell.
We can use the RIGHT function to extract the extension number. As all of the extension numbers are consistent in length, we can simply extract the last 7 characters.
- Press Enter and copy down.
The MID Function
The MID function helps us extract text from the middle of a cell.
The MID function has three arguments:
text - the cell that contains the text.
start_num - the character in the string where we want to start extracting from.
num_chars - the number of chars to extract.
In this example, we want to extract the extension number ONLY and not the 'x' or the brackets. We can use MID and FIND to do this.
In this example, we are using the MID function to find the first occurrence of "x" and then we are extracting the next 4 characters. The "+1" ensures that the "x" is not included in the extraction.
- Press Enter and copy down.
Lesson notes are only available for subscribers.