Parsing Names into Columns

redhots4

Board Regular
Joined
Aug 30, 2004
Messages
136
Office Version
  1. 365
Platform
  1. MacOS
I have a list of names. Sometimes they are two names, sometimes 3-4 name, sometimes they include III as in John Smith III. Below I've shown some examples and expected outcomes. Can you help with a formula to accomplish this? (Not sure on the proper spelling of Jingleheimer, so I took my best guess.)

Full NameExpected First NameExpected Last Name
John SmithJohnSmith
John Jacob SmithJohnSmith
John J SmithJohnSmith
John Jacob Jingleheimer SmithJohnSmith
John Jacob Jingleheimer-SmithJohnJingleheimer-Smith
John Smith IIIJohnSmith III
 

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.
Thank you! That works well for the First name, but doesn't return the proper result for last name. As an example, John Jacob Smith comes back as Jacob Smith (should just be Smith).
 
Upvote 0
yes, sorry, my eyes went a little googly with the result you required with all those John Jacob Smiths...

So heres another try:

roster.xlsm
ABCDEF
1John SmithJohnSmithSmith
2John J SmithJohnJ SmithSmith
3John Jacob SmithJohnJacob SmithSmith
4John Jacob Jingleheimer-SmithJohnJacob Jingleheimer-SmithJingleheimer-Smith
5John Smith VJohnSmith VSmith
Sheet2
Cell Formulas
RangeFormula
B1:B5B1=LEFT(A1,FIND(" ",A1,1)-1)
C1:C5C1=MID(A1,FIND(" ",A1,1)+1,LEN(A1))
E1:E5E1=LET(arrx,(MID(A1,FIND(" ",A1,1)+1,LEN(A1))),arry,IFERROR((MID(arrx,FIND(" ",arrx,1)+1,LEN(arrx))),arrx),arrz,RIGHT(arrx,2),IF(OR(arrz="II",arrz=" I",arrz="IV",arrz=" V"),LEFT(arrx,FIND(" ",arrx,1)-1),arry))


The main issue is you have "Jacob Smith" where you want to ditch the [first name], and then you have "Smith III" where you effectively want to ditch the [second name].
So this will work to some extent, but specifically looks for those with "II or "III" on the end. It will work for names up to Smith "V" for example.

cheers
Rob
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,959
Members
449,096
Latest member
Anshu121

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