Separate out first and last name

Nordicrx8

Board Regular
Joined
Dec 10, 2015
Messages
144
Office Version
  1. 365
Platform
  1. Windows
Hey all!

I have a very long list of employees in which I need to extract their names into a consistent format.

I'm using the below formulas with a 99% success rate, however employees with a suffix of "JR" or "II" (etc) are throwing a monkey wrench in the calculation.

First:
=MID(P14082,FIND(" ",P14082,1)+1,256)

Last:
=LEFT(P14082,(FIND(" ",P14082,1)-1))


Here is the format of my data:

Firstname Suffix LastName MiddleInitial


I ONLY need the first and last name. Is there a formula out there that can overcome the 2% of my names that have a suffix?

Thanks for the help team!

Best,
Chris
 
Hamedo89: in your last post, you pull the middle name (or initial), not the last name, if there isn't a Jr., etc.
 
Upvote 0

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
You can also get the last name from your structure using this (ugly) formula:

Code:
=LEFT(IF((LEN(A1)-LEN(SUBSTITUTE(A1," ","")))<2,A1,RIGHT(A1,LEN(A1)-FIND("/",SUBSTITUTE(A1," ","/",(LEN(A1)-LEN(SUBSTITUTE(A1," ",""))-1))))),FIND(" ",IF((LEN(A1)-LEN(SUBSTITUTE(A1," ","")))<2,A1,RIGHT(A1,LEN(A1)-FIND("/",SUBSTITUTE(A1," ","/",(LEN(A1)-LEN(SUBSTITUTE(A1," ",""))-1))))))-1)
 
Upvote 0
This worked - thanks so much!

Sorry for the late reply - work has been super busy and I haven't had a chance to work on this project.

thank you ALL for your time, responses, and help!

Happy Monday! :)

I didn't account for the suffix and middle name initial in my last name formula, revised version below.

=LEFT(MID(MID(A1,FIND(" ",A1)+1,256),IFERROR(FIND(" ",MID(A1,FIND(" ",A1)+1,256)),0)+1,256),IFERROR(FIND(" ",MID(MID(A1,FIND(" ",A1)+1,256),FIND(" ",MID(A1,FIND(" ",A1)+1,256))+1,256)),255)-1)
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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