FIRST NAME and LAST NAME

drluke

Active Member
Joined
Apr 17, 2014
Messages
314
Office Version
  1. 365
Platform
  1. Windows
I need to change a list of names in my spreadsheet: John Smith to Smith J

Is there a single formula I can use to do this?

I know to change the first name to an initial I can use

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

and to reverse the order I can use

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

But how to combine these 2 formulas? Or use another one that's better?
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Try the below … But if more names or spaces in A1 the formula may not work properly

=RIGHT(A1,LEN(A1)-FIND(" ",A1,1))&" "&LEFT(A1,1)
 
Last edited:
Upvote 0
Thank you!
The formula does not work for all names - e.g for the name David Jefferies, the result is 'feries J'
 
Upvote 0
Ok … I hope it is working ok now :)
 
Last edited:
Upvote 0
.. or with one less function :)
=REPLACE(A1,1,FIND(" ",A1),"")&" "&LEFT(A1,1)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,409
Messages
6,124,733
Members
449,185
Latest member
hopkinsr

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