Need to change order of first name last name

kmsprague

New Member
Joined
Nov 14, 2022
Messages
28
Office Version
  1. 365
Platform
  1. Windows
Hi all!
I need a formula that will help me to change the order of first name and last name. The hard part is that the report from the system has the name listed as First Name Last Name - Employee Number. The number of characters is different with each employee and the only delimiter that I have is the hyphen, which is also in some people's names. I need it to be Last Name, First Name to work with the other reports I'm using. Any ideas? All help is greatly appreciated!!
 

Attachments

  • Name example.png
    Name example.png
    5.7 KB · Views: 10

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
How about
Excel Formula:
=TEXTJOIN(", ",,INDEX(TEXTSPLIT(TEXTBEFORE(A2, " -",-1)," "),,{2,1}))
 
Upvote 1
Solution
Fluff, once again you've saved my day!! This worked perfectly! Thank you so very much!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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