jeffcoleky
Active Member
- Joined
- May 24, 2011
- Messages
- 274
I have thousands of names I need to separate into rows using formulas. This will be a challenge because of the naming format:
I have it MOSTLY down but I'm stuck because my first names get put into the middle name column when there is no middle initial.
SAMPLE DATA:
First Name Formula: =PROPER(IF(LEN(A2)-LEN(SUBSTITUTE(A2," ",""))=1,"",MID(A2,FIND(" ",A2,1)+1,FIND(MID(A2,FIND("~",SUBSTITUTE(A2," ","~",LEN(A2)-LEN(SUBSTITUTE(A2," ",""))))+1,255),A2,1)-2-FIND(" ",A2,1))))
MIDDLE NAME FORMULA: =PROPER(REPLACE(A2,1,SEARCH("^",SUBSTITUTE(A2," ","^",LEN(A2)-LEN(SUBSTITUTE(A2," ","")))),""))
LAST NAME FORMULA: =PROPER(LEFT(A2,SEARCH(" ",A2)-1))
YOUR HELP IS MUCH APPRECIATED!
I have it MOSTLY down but I'm stuck because my first names get put into the middle name column when there is no middle initial.
SAMPLE DATA:
Code:
A B C D
Full Name First Middle Last
SMITH BOB E Bob E Smith
FRENCH PIERRE S Pierre S French
CRICKET JIMMY Jimmy Cricket
GOLD POT OF Pot Of Gold
LATER CHARLIE U Charlie U Later
First Name Formula: =PROPER(IF(LEN(A2)-LEN(SUBSTITUTE(A2," ",""))=1,"",MID(A2,FIND(" ",A2,1)+1,FIND(MID(A2,FIND("~",SUBSTITUTE(A2," ","~",LEN(A2)-LEN(SUBSTITUTE(A2," ",""))))+1,255),A2,1)-2-FIND(" ",A2,1))))
MIDDLE NAME FORMULA: =PROPER(REPLACE(A2,1,SEARCH("^",SUBSTITUTE(A2," ","^",LEN(A2)-LEN(SUBSTITUTE(A2," ","")))),""))
LAST NAME FORMULA: =PROPER(LEFT(A2,SEARCH(" ",A2)-1))
YOUR HELP IS MUCH APPRECIATED!