I am using this formula to get a middle initial from a name in column A
Names in Column A are like:
Thomas Dan J
Jones Susan
Ayers John B II
=TRIM(MID(SUBSTITUTE($A2," ",REPT(" ",LEN($A2))),((COLUMNS($A2:C2)-1)*LEN($A2))+1,LEN($A2)))&"."
I want to only have the period (".") appear if there is a middle initial.
Currently Susan Jones has a lone . in the middle initial field because she doesn't have a middle initial. Is there a way to make that period conditional based on if there is a character available?
Names in Column A are like:
Thomas Dan J
Jones Susan
Ayers John B II
=TRIM(MID(SUBSTITUTE($A2," ",REPT(" ",LEN($A2))),((COLUMNS($A2:C2)-1)*LEN($A2))+1,LEN($A2)))&"."
I want to only have the period (".") appear if there is a middle initial.
Currently Susan Jones has a lone . in the middle initial field because she doesn't have a middle initial. Is there a way to make that period conditional based on if there is a character available?