59. Excel Tips - Reverse a name

Nick's picture


How do you reverse a name in Excel ?

This tip is very useful if you have a list of names in "Surname FirstName" format and you want to reverse that quickly.

Well, in Excel, there are a set of useful string manipulation functions you can use for this: LEN, FIND, MID, LEFT, RIGHT

  • LEN - Returns the number of characters in a value
  • FIND - Returns the position of a value in another value
  • MID - Extracts a value based on a starting position and length
  • LEFT - takes the X left most characters from a value
  • RIGHT - takes the X right most characters from a value ... where X is a number With the cell containing the name in B3.

First, we find the space.

=FIND(" ",B3,1)

Once we know the position of the space, we can reconstruct the name to reverse it by taking everything to the right of the space and adding everything to the left.

Extract Second Name

=LEFT(B3,FIND(" ",B3,1))

Extract First Name

=RIGHT(B3,LEN(B3)-FIND(" ",B3,1))

 

Here's how it looks in Excel: reverse-name-excel Download sheet to practise how to reverse a name in excel

 

Video Training on how to reverse a name: