Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, and 2016. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Reordering Last Name and First Name.

Reordering Last Name and First Name

by Allen Wyatt
(last updated December 12, 2015)

3

You may have a worksheet containing many cells with names that are in LastName, FirstName MI format. A common example of this would be an Excel worksheet designed to work as an expense account reporting form. You may want to convert these employee names into standard format, i.e. FirstName MI LastName. Performing this operation on more than a handful of cells can become quite cumbersome.

To make the conversion job easier, you can use a handy formula that rearranges the parts of the name for you. Assume that cell A1 contains the name Doe, Jane Q. and you want the conversion (Jane Q. Doe) to appear in cell B1. Place the following formula in B1:

=RIGHT(A1,LEN(A1)-LEN(LEFT(A1,FIND(",",A1)
-1))-2) & " " & LEFT(A1,FIND(",",A1)-1)

The formula works by breaking the string based on the placement of the comma. The formula will also work with suffixes and multiple middle initials as long as there is one and only one comma present in the source cell.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12042) applies to Microsoft Excel 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Excel here: Reordering Last Name and First Name.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Swapping Two Numbers

When programming macros, variables are used extensively. At some point you might want to exchange the values held by two ...

Discover More

Getting Rid of Mail Merge Section Breaks

When you create a group of documents from a merge file, Word normally inserts section breaks between iterations of the ...

Discover More

Protecting Worksheets from Deletion

If you share a workbook with others in your office, you will probably want to make sure that some of the worksheets don't get ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (ribbon)

Calculating the Median Age of a Group of People

Suppose you have a worksheet that contains a list of ages and then a count of people who correspond with those ages. You may ...

Discover More

Summing Based on Part of the Information in a Cell

Excel provides a variety of tools that allow you to perform operations on your data based upon the characteristics of that ...

Discover More

Incrementing References by Multiples when Copying Formulas

You can easily set up a formula to perform some calculation on a range of cells. When you copy that formula, the copied ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is seven minus 2?

2016-12-10 09:29:00

Willy Vanhaelen

@Sara Gonzalez

This shorter formula will do the job whether or not there is a space after the comma.

=TRIM(MID(A1,FIND(",",A1)+1,LEN(A1)))&" "&LEFT(A1,FIND(",",A1)-1)


2016-12-09 14:21:47

Sara Gonzalez

What if my text isn't seperated by a space after the comma. For example our program generates the name as follows last,first with no space between the comma and first name. So when I use this formula it chops it up. So I would have to manually enter the space in order for the formula to work. Any quick fixes.


2016-03-31 08:05:21

Louis LAFRUIT

This seems much simpler to me;
Dim myArry() as string
myArry=split ("A1",",")
A1=myArry(1) & "," & myArry(0)


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.