How to Split First And Last Name in Excel (6 Easy Ways)

The sample dataset contains two columns: Full Name and Account Number. We’ll split the Full Name column.

Sample Dataset to Split First And Last Name in Excel


Split the First and Last Name in Excel: 6 Easy Ways

Method 1 – Using Text to Columns to Split the First and Last Name

  • Select the cell or cell range you want to split. We selected the cell range B4:B13.
  • Open the Data tab and select Text to Columns.

Using Text to Columns to Split First And Last Name in Excel

  • A dialog box will pop up.
  • In Choose the file type that best describes your data, select Delimited as the data has a space character between the first and the last name.
  • Click Next.

  • Another dialog box will pop up. Select the Delimiters that your data has. We checked Space.
  • Click Next.

Using Text to Columns to Split First And Last Name in Excel

  • Another dialog box will pop up. Select the Destination to place your split data.

  • We selected the D4 cell to place the separated first and last names.

Using Text to Columns to Split First And Last Name in Excel

  • Click Finish.

  • A warning message will appear.
  • Click OK.

Using Text to Columns to Split First And Last Name in Excel

  • You will get the first and last names from the full names.

Read More: How to Split Text by Number of Characters in Excel


Method 2 – Using Flash Fill to Split the First and Last Name

  • We added two new columns for First Name and Last Name.
  • Type the name part of the Full Name that you want to extract in the first cell. We typed the name Adam in the First Name column.

Using Flash Fill to Split First And Last Name

  • In the second cell, type the first name from the B5 cell. In most cases, Excel will detect a pattern and populate the first names in all other cells automatically.

  • Press Enter to Fill all the First Names automatically.

Using Flash Fill to Split First And Last Name in Excel

  • Repeat the process for extracting the Last Name from the cells with Full Name.

  • Here’s our result.

Using Flash Fill to Split First And Last Name in Excel

In case your Flash Fill feature is not enabled by default, click on the Data tab and select Flash Fill.

If it still doesn’t work, go to Options, select Advanced and check the Flash Fill box, then make sure the Automatically is selected under Editing options.

Read More: How to Split Text by Space with Formula in Excel


Method 3 – Using Flash Fill to Split First and Last Names When a Middle Name Exists

We’ve added middle names to the cells in the Full Name column.

Using Flash Fill to Split First And Last Name When There Are Middle Name

  • We added two new columns one for First Name another for Last Name.
  • Type the name part of the Full Name that you want to extract in the first cell. We typed the name Adam in the First Name column.

  • Select the cell where you put the pattern to follow. We selected cell D4.
  • Open the Data tab and select Flash Fill in Data Tools.

  • You will get the First Name from the Full Name.

Using Flash Fill to Split First And Last Name When There Are Middle Name

  • Repeat the process for Last Name after inserting the first value manually for cell E4.

  • You will get the Last Names from the Full Name column.

Using Flash Fill to Split First And Last Name When There Are Middle Name

Read More: How to Split Text in Excel Using Formula


Method 4 – Using Functions to Split the First and Last Name


Case 4.1 – Using LEFT and FIND Functions to Split the First Name

  • Select any cell to place the First Name.
  • Insert the following formula.
=LEFT(B4,FIND(" ",B4,1)-1)

Using LEFT & FIND Function to Split First Name in Excel

Formula Breakdown

FIND(” “,B4,1)—> will find the position of the first space character.
     Output: 5

FIND(” “,B4,1)-1 —> becomes
     5-1
     Output: 4

LEFT(B4,FIND(” “,B4,1)-1)—> This will return the First Name from the Full Name column.
     LEFT(B4, 4)
     Output: Adam
     Explanation: Extracts the First 4 letters from the Full Name.

  • Press the Enter key.

  • Use the Fill Handle to AutoFill the formula for the rest of the cells.

Using LEFT & FIND Function to Split First Name in Excel

Read More: How to Split Text in Excel by Character


Case 4.2 – Using RIGHT and FIND Functions to Split the Last Name

  • Select any cell to place the Last Name.
  • Insert the following formula.
=RIGHT(B4,LEN(B4)-FIND(" ",B4,1))

Using RIGHT & FIND Function to Split First Name in Excel

Formula Breakdown

FIND(” “,B4,1)—> will find the position of the first space character.
     Output: 5

LEN(B4)—> will return the number of characters in the text string.
     Output: 10

LEN(B4)-FIND(” “,B4,1) —> becomes
     10-5
     Output: 5

RIGHT(B4,LEN(B4)-FIND(” “,B4,1))—> This will return the Last Name from the Full Name column.
     RIGHT(B4, 5)
     Output: Smith
     Explanation: Extracted the Last 5 letters from the Full Name.

  • Hit Enter.

  • Use the Fill Handle to AutoFill the formula for the rest of the cells.

Using RIGHT & FIND Function to Split First Name in Excel

Read More: How to Split Text in Excel into Multiple Rows


Method 5 – Using a Function to Split the First and Last Name with a Comma

We’ve modified the dataset to include a comma as a separator.

Using Function to Split First And Last Name with Comma in Excel


Case 5.1 – Using LEFT and SEARCH Functions to Split the First Name

  • Select any cell to place the First Name.
  • Insert the following formula.
=LEFT(B4,SEARCH(" ",B4)-2)

Using LEFT & SEARCH Function to Split First Name in Excel

Formula Breakdown

SEARCH(” “,B4) —> will search the position of the first space character.
     Output: 6

SEARCH(” “,B4)-2 —> becomes
     6-2
     Output: 4

LEFT(B4,SEARCH(” “,B4)-2)—> This will return the First Name from the Full Name column.
     LEFT(B4, 4)
     Output: Adam
     Explanation: Extracts the First 4 letters from the Full Name.

  • Hit Enter.

  • Use the Fill Handle to AutoFill the formula for the rest of the cells.

Using LEFT & SEARCH Function to Split First Name in Excel


Case 5.2 – Using RIGHT and SEARCH Functions to Split Last Name

  • Use the following formula.
=RIGHT(B4, LEN(B4) - SEARCH(" ", B4))

Using RIGHT & SEARCH Function to Split Last Name

Note that we’re still searching for the space as it’s after the comma.

Formula Breakdown

SEARCH(” “, B4) —> will search the position of the first space character.
     Output: 6

LEN(B4) —> will return the number of characters in the text string.
     Output: 11

LEN(B4) – SEARCH(” “, B4) —> becomes
     11-6
     Output: 5

RIGHT(B4, LEN(B4) – SEARCH(” “, B4)) —> This will return the Last Name from the Full Name column.
     RIGHT(B4, 5)
     Output: Smith
     Explanation: Extracts the Last 5 letters from the Full Name.

  • Hit Enter.

  • Use the Fill Handle to AutoFill the formula for the rest of the cells.

Using RIGHT & SEARCH Function to Split Last Name

Read More: How to Split Text after a Certain Word in Excel


Method 6 – Using Find and Replace to Split the First and Last Name


Case 6.1 – Find the First Name

  • Copy all the names from Full Name to a new column.

Find The First Name in Excel

  • Select the cell range from which you want to extract only your First Name.
  • In the Home tab, go to Find & Select and select Replace.

  • A dialog box will pop up.
  • Insert a single Space followed by an Asterisk(*) in Find what.
  • Keep the Replace with field Blank.
  • Click on Replace All.

Find The First Name in Excel

  • A message will pop up showing how many replacements occurred.
  • Click OK and close the dialog box.

  • All the characters after the space are replaced with a blank, so only the first name remained.


Case 6.2 – Find the Last Name

  • Copy all the names from Full Name to a new column.

Find The Last Name in Excel

  • Select the cell range from where you want to extract only Last Name.
  • Go to Find and Select and choose Replace.

  • A dialog box will pop up.
  • Insert an Asterisk(*) followed by a single Space in Find what.
  • Keep the Replace with field Blank.
  • Click on Replace All.

Find The Last Name in Excel

  • A message will pop up showing how many replacements occurred.
  • Click OK and close the dialog box.

  • All the characters before space are replaced with Blank so you will get the Last Name.

Find The Last Name in Excel


Practice Section

We’ve provided a practice sheet in the workbook to practice these explained examples.


Download the Practice Workbook


Related Articles


<< Go Back to Splitting TextSplit in ExcelLearn Excel

Get FREE Advanced Excel Exercises with Solutions!
Shamima Sultana
Shamima Sultana

Shamima Sultana, BSc, Computer Science and Engineering, East West University, Bangladesh, has been working with the ExcelDemy project for 2 years. She has written over 75+ articles and reviewed 1000+ articles for ExcelDemy. She has also led several teams with Excel VBA and Content Development works. Currently, she is working as the Project Manager and oversees the day-to-day work, leads the services team, allocates resources to the right area, etc. Her work and learning interests vary from Microsoft... Read Full Bio

1 Comment
  1. Thanks, Shamina, This is a very useful and helpful article. I appreciate you taking the time to document these options. Regards, Steph (Sinclair)

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo