Text manipulation functions
Most datasets are a mix of text fields and numeric fields. A good data analyst should be adept at manipulating text fields. In this section, we will cover the major text manipulation functions you should be proficient at using:
LEFT
MID
RIGHT
SEARCH
SUBSTITUTE
TEXT
LEN
The first of these text manipulation functions that we will cover is LEFT
.
LEFT
LEFT
is an Excel function that extracts the first set of characters in a provided value. Its syntax is LEFT(text,number_of_characters)
. It is often useful for extracting a categorizing substring from a text field. The following screenshot shows an example involving extracting a country code from an asset tag:
Figure 6.15 – LEFT function example
The formula extract is =LEFT(A3,2)
. It extracts the first two characters from the selected cell.
MID
MID
is an Excel formula for extracting characters from a provided value starting from...