Switch First & Last Names w/ Commas – Excel & Google Sheets

This tutorial will demonstrate how to switch first and last names in Excel and Google Sheets.

switch first last names commas Main Function

Switch First and Last Names

Typically names are stored in one of two formats:

  • Last Name, First Name
  • First Name Last Name

Using Excel formulas we can switch the names around.

This formula will switch names from the first format to the second:

switch first last names commas 01

We will walkthrough this below.

SEARCH Function

First, we will use the SEARCH function to show us the position of the space within the name:

switch first last names commas SEARCH

We add plus 1 to the formula to get the position of the beginning letter of the first name.

We will then use the LEN function to return the number of characters in a cell.

LEN Function

The LEN Function will return the number of characters in a cell.

switch first last names commas LEN

MID Function – Return Characters From the Middle of a Text String

Now we can use the MID function to populate a text string, and return the characters from the middle of the string based on the positions we have stipulated (Find Space and Len).

switch first last names commas MID

Combining these functions yields the original formula.

Switch Last and First Names

You can also flip the text the other way and add in the comma using this formula:

switch first last names commas FINAL

Switch First & Last Names w/ Commas in Google Sheets

These formulas work exactly the same in Google Sheets as in Excel.

switch first last names commas Google Function

 

Excel Practice Worksheet

Practice Excel functions and formulas with our 100% free practice worksheets!

  • Automatically Graded Exercises
  • Learn Excel, Inside Excel!