59. Excel Tips - Reverse a name
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.
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
Extract First Name
Here's how it looks in Excel: Download sheet to practise how to reverse a name in excel
Video Training on how to reverse a name: