Abstract

You will often receive spreadsheets with usernames. Sometimes these spreadsheets have the first name and the second name in different columns. However, spreadsheets usually contain the Full name in a single column. So what do you do then? Simply follow the options mentioned below to split the user name as first name and last name into two columns.

Get first name and last name through the GUI

Level of difficulty: LOW

How To Separate First And Last Name In Excel Excel’s Convert Text to Column

Excel’s parsing concept helps you to split and spread text from one column to multiple columns. We can parse full name into first name and last name using Excel’s text to columns wizard. Follow the steps mentioned below to understand how Text to Columns works:

Step 1: Select the column that contains the full name. Instead of selecting an entire column you can also select a range but make sure that you are not selecting text from multiple columns. Additionally, ensure that there are empty columns to the right of selected range or column. This is an important step as text on adjacent columns will be overwritten if there are no empty columns.

Step 2: On your Excel ribbon, select Data and then click the option “Text to Columns”. You will now see the Convert Text to Columns Wizard.

Step 3: The first step in this wizard is to select the data type. You have two options. First is the Delimited and the second is Fixed Width. Select Delimited if your data is separated by characters such as commas,  tabs, any other special characters or symbols. Select the option Fixed width if the data in your column is separated by fixed width spaces.

How To Separate First And Last Name In Excel 1

Step 4: If you have chosen Delimited, then you would be able to choose the delimiters in the next screen. Available options are as follows:
1) Tab

2) Semicolon

3) Comma

4) Space

5) Other

If you select option 5 ‘Other’ it would allow you to type a character in a text box.

If you have chosen the option Fixed Width rather than Delimiter, then you would be able to set Column Breaks. To insert Columns breaks in the data preview window, click on the desired position.

To delete a column break, double click on it. To move a column break, you can click and drag it to the new position.

How To Separate First And Last Name In Excel 2


Step 5: The third screen would allow you to set the data type for the new column that would be populated with the data which is created at the end of this wizard. The default option is General which converts numeric values to numbers, date values to dates, and all remaining values to text.

Other available options are Text and Date. You also have an option that does not import the data to a column.

How To Separate First And Last Name In Excel 3


Step 6: Press Finish and you will be able to see the First Name and the Last Name in new columns.

How To Separate First And Last Name In Excel 4

How To Separate First And Last Name In Excel Get first name and last name using formulas

Level of difficulty: LOW

Excel’s Convert Text to Column

There are no direct and specific formulas in Excel to convert the Full name into first name and last name. However, by combining multiple excel formulas we can achieve this.

To get the first name

Using LEFT and SEARCH formulas you can build a formula to extract the first name. Below is the syntax

 Syntax :
How To Separate First And Last Name In Excel 5

Do replace the CELL ADDRESS in the above syntax with the actual value as shown in the example below:

According to this example, the full name is present in the Cell B2. When we type this formula in the Cell C2, it would generate the first name.

To get the last name

Using RIGHT, LEN, SEARCH formulas you can build a formula to extract the last name. Below is the syntax

Syntax :

Do replace the CELL ADDRESS in the above syntax with the actual value as shown in the example below:

According to this example, the full name is present in the Cell B2. When we type this formula in the Cell D2, it would generate the Last name.

How does it work?

The formula searches for space or comma in the cell’s text. If space or comma is found, all the text found on its left is extracted and displayed as the first name.

The last name is displayed by extracting all text to the right of the space or comma.

How To Separate First And Last Name In Excel Get first name and last name using macro

Level of difficulty: MEDIUM

Using a macro, you can create user defined functions. You can then use these functions in your Excel sheets. This will help you attain your goal using a single function.

The cell containing the full name should be passed as the parameter to these user defined functions.

After posting these scripts into a new module, you can use these functions as shown in the images below:

How To Separate First And Last Name In Excel 11