Using Excel 2010
I have numerous sheets with names in column E, with names on some sheets as Last, First, and other sheets as Last First Initial.
Worked all day on trying to get the below formula working but to no avail and then I uses IFERROR and it worked, but I would still like to know what I am doing wrong with the IF(ISERROR formula below...
=IF($E10="","",
IF(ISERROR(LEFT($E10,FIND(",",$E22,1)-1)&" "&MID($E10,FIND(",",$E10,1)+2,1)),
IF(ISERROR(LEFT($E10,FIND(" ",$E21,1)-1)&" "&RIGHT($E10,1)),"???",
IF(ISERROR(LEFT($E10,FIND(",",$E10,1)-1)&" "&MID($E10,FIND(",",$E10,1)+2,1)),
LEFT($E10,FIND(" ",$E10,1)-1)&" "&RIGHT($E10,1),
LEFT($E10,FIND(",",$E10,1)-1)&" "&MID($E10,FIND(",",$E10,1)+2,1)))))
I still can't believe the IFERROR works this simple...
=IF($E10="","",
IFERROR(LEFT($E10,FIND(",",$E10,1)-1)&" "&MID($E10,FIND(",",$E10,1)+2,1),
LEFT($E10,FIND(" ",$E10,1)-1)&" "&RIGHT($E10,1)))
I have numerous sheets with names in column E, with names on some sheets as Last, First, and other sheets as Last First Initial.
Worked all day on trying to get the below formula working but to no avail and then I uses IFERROR and it worked, but I would still like to know what I am doing wrong with the IF(ISERROR formula below...
=IF($E10="","",
IF(ISERROR(LEFT($E10,FIND(",",$E22,1)-1)&" "&MID($E10,FIND(",",$E10,1)+2,1)),
IF(ISERROR(LEFT($E10,FIND(" ",$E21,1)-1)&" "&RIGHT($E10,1)),"???",
IF(ISERROR(LEFT($E10,FIND(",",$E10,1)-1)&" "&MID($E10,FIND(",",$E10,1)+2,1)),
LEFT($E10,FIND(" ",$E10,1)-1)&" "&RIGHT($E10,1),
LEFT($E10,FIND(",",$E10,1)-1)&" "&MID($E10,FIND(",",$E10,1)+2,1)))))
I still can't believe the IFERROR works this simple...
=IF($E10="","",
IFERROR(LEFT($E10,FIND(",",$E10,1)-1)&" "&MID($E10,FIND(",",$E10,1)+2,1),
LEFT($E10,FIND(" ",$E10,1)-1)&" "&RIGHT($E10,1)))
Last edited: