Hey all,
I have an excel formula producing duplicate last names.
For example, I have a list like this:
Corn,Marlin
Lizand,ROBERT H
CATANESE,SALVATORE J & OLGA M
JIMENEZ,ALEJANDRO & HILDA M
Hernara,Harry & Marie Anne Martin
CORNWALL,A ROBERT & CORNWALL,ANNA
When there is an ampersand names must get split into two columns, so i use the below formulas:
=IF( ISERROR( SEARCH("&", A15) ), IF( ISERROR( SEARCH(" ", A15) ), A15, LEFT(A15,LOOKUP(2^15,FIND(" ",A15,ROW(INDIRECT("1:"&LEN(A15)))))-1)),SUBSTITUTE(A15,MID(A15,FIND(",",A15,1)+1,FIND("&",A15,1)-FIND(",",A15,1)),""))
and:
=IF(ISERR(FIND("&",A15,1)),"",LEFT(A15,FIND("&",A15,1)-1))
This has the resulting effect:
First column:
Corn,Marlin
Lizand,ROBERT H
CATANESE, OLGA M
JIMENEZ, HILDA M
Hernara, Marie Anne Martin
CORNWALL, CORNWALL,ANNA
Second Column:
CATANESE,SALVATORE J
JIMENEZ,ALEJANDRO
Hernara,Harry
White,Alex
Martin,Harry
CORNWALL,A ROBERT
As you can see, the formula causes a duplicate of the last name in the first column. Any suggestion to refine formula so it doesn't cause that duplicate, yet doesn't negatively impact the other results?
Thanks for any response
Bookmarks