How To – Separate Full Name into First and Last in Excel

Data sheet

Have you ever received a contact list with all the names listed in full, and you’ve needed to separate them into different cells? I know I have, so I had to find a way to split them without doing it manually.

What I’ve found is that Excel is great. The functions can do just about everything – including splitting first and last name into individual cells! There is a method built into Excel to do this as well, which I’ll also show you. It’s helpful for larger amounts of data where the function can get complicated and messy.

Using the Function

The function works for these two types of lists; firstname lastname and lastname, firstname.

The process is the same, though the function varies slightly. So if this is the list you’ve got, you’ll want to enter the formula to the right, or insert some columns if there is more information.

Excel name list

To get started, the function you’ll need is: =LEFT(XX, SEARCH(” “, XX)- 1) where XX is the cell that has the full name in it as firstname lastname. If it’s like my second column, lastname, firstname, change the ” ” to “,” (see example below).

This is what the function is doing; LEFT is starting at the left and grabbing any string of numbers or letters, and SEARCH is then finding the space (” “) and ending the string. The -1 is the deleting the space, leaving you with just the first name. You’ll have your list looking like the below.Excel first name function

Excel first name list

To get the next name, you’ll need to start from the right, and this is the formula: =RIGHT(XX,LEN(XX) -SEARCH(” “,XX))

This function is doing something slightly different; Starting from the RIGHT, it’s finding the whole length (LEN) of the string, then doing a SEARCH for the position of the space, and then subtracting that position from the total length. Once you input this into the next column, or in my case column C, your list will look like this;

Excel last name function

Excel last name listYou can easily drag the formula down the entire list and separate your list in no time!

Excel Text to Columns

When you have more than 2 pieces of text that you want to separate into columns, the above formulas are not practical. Instead, Excel has a “Text to Columns” feature than we can use.

First, highlight the records you need to separate, then click on Data and Text to Column. In my example below, I have the first row with 4 words, and the second with 6 words.

Excel text to column exampleOnce you click on Text to Columns under data tools (to the right of the above screenshot), a 3 step dialogue box will appear. In our case, we want to choose Delimited for step 1 since there is a space between each word;

Excel text to column wizard 1In step 2, you choose what separates your text. You can choose from Tab, Semicolon, Comma, Space, or choose Other and key in your own;

Excel text to column wizard 2In the final step, you choose the data type for the columns. For example, if you’re splitting data that has a date in it, you can set the column that contains the date to Date, and select the format you’d like;

Excel text to column wizard 3Once you click on finish, your data will appear in columns, so for me, I have row one in four columns, and row two in six. This feature has the potential to make your life a lot easier.

Excel text to column completeIf you’re having any issues with this, please Contact Us and we’ll be happy to help out!

Written by

The author didnt add any Information to his profile yet

Leave a Reply

Your email address will not be published. Required fields are marked *