formula to reverse first and last names

biglb79

Active Member
Joined
Oct 17, 2007
Messages
303
Office Version
  1. 2019
Platform
  1. Windows
I have a spreadsheet showing names of individuals with first name then last name separated by a space. is there a formula I can use to have last name, first name?

so last name then a comma and first name
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
What version of Excel are you using and are there any middle names or letters
 
Upvote 0
Excel 2019 MSO

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
done
 
Upvote 0
Upvote 0
Solution
Hello! How about this?
VBA Code:
=RIGHT(A1;LEN(A1)-SEARCH(" ";A1))&", "&LEFT(A1;SEARCH(" ";A1)-1)
 
Upvote 0
Do you have any multi-word first names like "Billy Joe" or "Bobby Sue"?
Or any multi-row last names like "Van Buren"?

If so, then this can be a bit tricky, because then there could be multiple spaces in the name, and Excel would have no idea which one separates the first name from the last name (as you cannot come up with any sort of "rule" or "logic" that is guaranteed to work in all instances).
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,224,815
Messages
6,181,135
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top