Splitting out title, first name, middle name, last name

OP193

New Member
Joined
Aug 21, 2019
Messages
3
Hi all

I know there's been multiple posts on this throughout the past but all with slightly different requirements...

I have a list of c.1500 names (some with middle names, some without) and i'm trying to split them out by title, first, middle (if there is one) and surname. I've tried text to columns but obviously as not all have middle names it doesn't give the result I want.

So in cell E5 i have "Mr Joe x Bloggs"

What I'm trying to achieve is

F5: Mr
G5: Joe
H5: x
I5: Bloggs

Where there isn't a middle name it would be great if i could automatically pull the surname into I ignoring H, but worst case scenario i can filter by blanks on I and pull across the surnames sat in H.


Any help much appreciated..

Thanks
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Hey try this:

F5:
TRIM(MID(SUBSTITUTE($E5,CHAR(32),REPT(CHAR(32),LEN($E5))),(COLUMN()-6)*LEN($E5)+1,LEN($E5)))

Drag across the row
 
Upvote 0
Do all names have a title? Are middle names just middle initials or the full name?

Are the names formatted in a way where you can text to columns based on column width?
 
Upvote 0
If all the names have a prefix and there are no suffix abbreviations on any name AND if everything is separated by a space (phew), I think this (UGLY) formula set works:


Book1
EFGHI
4PrefixFirstMiddleLast
5Mr. Joe X BoggsMr.JoeXBoggs
6Mr. William Mark SmithMr.WilliamMarkSmith
7Mr. Samuel Oscar SmitheMr.SamuelOscarSmithe
8Miss Susan JonesMissSusanJones
9Miss Mary Kay JohnsonMissMaryKayJohnson
10Dr. Master SurgeonDr.MasterSurgeon
Sheet1
Cell Formulas
RangeFormula
F5=LEFT(E5,FIND(" ",E5)-1)
G5=MID(E5,1+FIND(CHAR(160),SUBSTITUTE(E5," ",CHAR(160),1)),(FIND(CHAR(160),SUBSTITUTE(E5," ",CHAR(160),2)))-FIND(CHAR(160),SUBSTITUTE(E5," ",CHAR(160),1)))
H5=IF(3=SUMPRODUCT(LEN(E5)-LEN(SUBSTITUTE(E5," ",""))),MID(E5,FIND(CHAR(160),SUBSTITUTE(E5," ",CHAR(160),2))+1,(FIND(CHAR(160),SUBSTITUTE(E5," ",CHAR(160),3)))-FIND(CHAR(160),SUBSTITUTE(E5," ",CHAR(160),2))),"")
I5=RIGHT(E5,LEN(E5)-FIND(CHAR(160),SUBSTITUTE(E5," ",CHAR(160),LEN(E5)-LEN(SUBSTITUTE(E5," ",""))),1))
 
Upvote 0
What happens if you have a name like
Mr Joost van der Westhuizen
 
Upvote 0
What happens if you have a name like
Mr Joost van der Westhuizen
Or his wife...

Mary Ann van der Westhuizen

where Mary Ann is the full, legal first name (I worked with someone with that first name). The point here is you cannot assume all first and last names are single names.
 
Last edited:
Upvote 0
That's a problem! GRIN

I clearly made some assumptions based on the OP's post and my own thinking.

This type of problem is very tricky. There could be an ESQ, III, Sr., Jr., type of suffix at the end of the name as well.
 
Last edited:
Upvote 0
Not forgetting titles such as
The Right Honorable
or
The Very Reverend

:eeek:
 
Last edited:
Upvote 0
Thanks all for the quick replies! I’ll test these solutions in the morning and come back to you ?
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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