Need to change order of first name last name

kmsprague

New Member
Joined
Nov 14, 2022
Messages
27
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: 7

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
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,215,092
Messages
6,123,064
Members
449,090
Latest member
fragment

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