Text to Columns - Only want to split SPECIFIC NUMBER of times
Hi,
You may want to try the following array formula (Ctrl+Shift+Enter)
Assuming the name in cell A32, enter the following array formulas
In cell B32 (to get first name)
=MID(A32,MATCH(TRUE,EXACT(MID(A32,ROW($1:$40),1),P ROPER(MID(A32,ROW($1:$40),1))),0),MATCH(TRUE,EXACT (MID(A32,ROW($2:$40),1),PROPER(MID(A32,ROW($2:$40) ,1))),0))
In cell C32 (to get middle name)
=IF(ISERROR(MID(A32,SEARCH(" ",A32,1)+1,SEARCH("
",A32,MATCH(32,CODE(MID(A32,ROW($1:$40),1)),0) +1)-SEARCH(" ",A32,1))),"
",MID(A32,SEARCH(" ",A32,1)+1,SEARCH("
",A32,MATCH(32,CODE(MID(A32,ROW($1:$40),1)),0) +1)-SEARCH(" ",A32,1)))
In cell D32, to get anything after that
=IF(ISERROR(MID(A32,SEARCH("
",A32,MATCH(32,CODE(MID(A32,ROW($1:$40),1)),0)+1)+ 1,255)),MID(A32,MATCH(TRUE,EXACT(MID(A32,ROW($2:$4 0),1),PROPER(MID(A32,ROW($2:$40),1))),0)+2,255),MI D(A32,SEARCH(" ",A32,MATCH(32,CODE(MID(A32,ROW($1:$40),1)),0)+1)+ 1,255))
Regards,
Ashish Mathur
"NewKid" wrote:
I am trying to split names across columns. The problem is that some names
spilt into 3 columns (first, middle, last), and others split across 5 or 6
(extra names, etc.)
Is there a way to specify split, using SPACE as a delimiter, but only split
on the first TWO spaces, then leave the rest alone?
I'm having a terrible time figuring this out. Any ideas anyone?
Thank you so much!
Mary
|