In this tutorial, we will be learning how to separate strings of text. There are several functions that can be used to accomplish this task, including the LEFT, LEN, FIND, and RIGHT functions. These functions each have their own specific purpose and can be used in combination to effectively separate text strings.
Separating Strings. Imagine you have a column of full names in an Excel spreadsheet, and you need to separate the names into two columns: first name and last name. For example, the full name “Normie Kimmich” would be separated into “Normie” in the first name column and “Kimmich” in the last name column. To do this, here’s a step-by-step guide on how to separate these names using the LEFT, LEN, FIND, and RIGHT functions in Excel:
- Start by creating two new columns next to the column of full names. Label one column “First Name” and the other column “Last Name.”
- In the first cell of the “First Name” column, enter the formula =LEFT(A2,FIND(” “,A2)). This formula tells Excel to look at the first cell of the full name column (A2), and extract the leftmost characters up to the first space found in the cell using the FIND function.
- Press Enter and then copy and paste the formula in the rest of the cells in the “First Name” column.
- Next, In the first cell of the “Last Name” column, enter the formula =RIGHT(A2,LEN(A2)-FIND(” “,A2)). This formula tells Excel to look at the first cell of the full name column (A2), and extract the rightmost characters after the first space found in the cell using the FIND and LEN functions.
- Press Enter, and then copy and paste the formula in the rest of the cells in the “Last Name” column.
- You should now have two columns, one with the first name and the other with the last name separated from the original column of full names.
Note: In case your name has more than one space like “John Scott Smith” you should replace the formula =LEFT(A1,FIND(” “,A1)-1) with =LEFT(A1,FIND(” “,A1,FIND(” “,A1)+1)-1)
and =RIGHT(A1,LEN(A1)-FIND(” “,A1)) with =RIGHT(A1,LEN(A1)-FIND(” “,A1,FIND(” “,A1)+1))
The LEFT, LEN, FIND, and RIGHT functions in Excel are extremely useful when it comes to separating text strings. These functions can be used to separate names, but they can also be applied to a variety of other scenarios, such as separating product names from product numbers, separating city names from zip codes, and much more. The flexibility and power of these functions make them essential tools for anyone who works with data in Excel. With a bit of practice, you will be able to use these functions to solve all sorts of text string separation problems in Excel, making your data cleaner, more organized, and easier to analyze.