Locked lesson.
About this lesson
Take a first look at Excel's new set of functions for manipulating text. (Microsoft 365, Excel 2021 only)
Exercise files
Download this lesson’s related exercise files.
05-05-New Text Manipulation Functions-Start.xlsx11.1 KB 05-05-New Text Manipulation Functions-Complete.xlsx
12.9 KB 5.05 new-text-manipulation-functions - Exercise.docx
52.9 KB Exercise - New Text Manipulation Functions.xlsx
13.6 KB 5.05 new-text-manipulation-functions - Exercise solution.docx
101.5 KB Exercise Solution - New Text Manipulation Functions.xlsx
14.6 KB
Quick reference
New Text Manipulation Functions (Microsoft 365, Excel 2021 only)
Use new Excel functions, TEXTBEFORE, TEXTAFTER, and TEXTSPLIT to manipulate text in a worksheet.
When to use
We use TEXTBEFORE, TEXTAFTER, and TEXTSPLIT to split up data across columns.
Instructions
TEXTBEFORE, TEXTAFTER, and TEXTSPLIT are new functions that are available to users of Excel for Microsoft 365.
These functions allow us to split up data across columns and cells much like existing text functions, RIGHT, LEFT, and MID.
The difference with the new functions is that they are much simpler to use and have additional arguments that allow us to specify multiple delimiters and the delimiter instance.
TEXTBEFORE and TEXTAFTER
In this example, we need to split up the name and extension number in column B across columns D, F, and H.
Extract the First name
We can use TEXTBEFORE to extract the first name. Only the first two arguments of TEXTBEFORE are mandatory.
text - the cell that contains the text.
delimiter - the delimiter present in the string.
Our delimiter is a space. If we don't specify an instance number, this formula will extract all text from cell B7 that is before the first space.
We have now successfully extracted the first name.
Extract the Full Name
This time, we need to extract the full name from cell B7. We can do this using TEXTBEFORE but we need to specify that we want to extract everything before the second space.
We have now successfully extracted the full name.
Extract the Ext. No
Next, we need to extract the extension number from cell B7. We can do this using a combination of TEXTBEFORE and TEXTAFTER.
We can start by using TEXTAFTER to extract all text after the "x".
This doesn't return exactly what we want.
We can add TEXTBEFORE to extract everything before the bracket.
Now we get the correct result.
TEXTSPLIT
TEXTSPLIT allows us to specify one or more delimiters to split up text across columns.
In this example, we have a list of subjects that we need to assign to each student. Notice that some of the subjects are separated with a comma and some subjects are separated with a semi-colon.
TEXTSPLIT allows us to define multiple delimiters by placing them inside curly brackets {}.
Excel knows to split the text string wherever it finds a comma or a semi-colon.
In the next example, we need to use TEXTSPLIT to split up the full name. However, each name is not consistent. Some names have a title and others do not. We can define the space and the titles as delimiters inside curly brackets {}
Notice that wherever there was a title there is now a blank cell and everything has been shifted to the right.
Let's modify the formula to ignore empty cells.
We now have the correct result.
Login to download
Lesson notes are only available for subscribers.