Right now I have this formula in a macro for formatting a workbook that will look at a cell with a first and last name and put the two names into two different cells, then only keep the cell with the last name.
How can I change it to keep the first initial of the first name and the last name?
this is the formula:
=IF(LEN(RC[-1])-LEN(SUBSTITUTE(RC[-1], "" "", """")) = 2, MID(RC[-1],FIND("" "",RC[-1])+1,FIND("" "",RC[-1],FIND("" "",RC[-1])+1)-(FIND("" "",RC[-1])+1)),RIGHT(RC[-1],LEN(RC[-1])-FIND(""*"",SUBSTITUTE(RC[-1],"" "",""*"",LEN(RC[-1])-LEN(SUBSTITUTE(RC[-1],"" "",""""))))))
How can I change it to keep the first initial of the first name and the last name?
this is the formula:
=IF(LEN(RC[-1])-LEN(SUBSTITUTE(RC[-1], "" "", """")) = 2, MID(RC[-1],FIND("" "",RC[-1])+1,FIND("" "",RC[-1],FIND("" "",RC[-1])+1)-(FIND("" "",RC[-1])+1)),RIGHT(RC[-1],LEN(RC[-1])-FIND(""*"",SUBSTITUTE(RC[-1],"" "",""*"",LEN(RC[-1])-LEN(SUBSTITUTE(RC[-1],"" "",""""))))))