Hi all,
I know how to add a period to the middle initial, but I can't figure out how to add a period if there is a first or last initial.
Example:
John Albert Smith = John Albert Smith
John A Smith = John A. Smith
J A Smith = J. A. Smith
J Albert Smith = J. Albert Smith
John Albert S = John Albert S.
In Excel, I've been using this to add a period to a middle initial assuming the whole name is in cell B2:
=IF(ISNUMBER(SEARCH(" ? ",B2)),LEFT(B2,SEARCH(" ? ",B2)+1)&"."&RIGHT(B2,LEN(B2)-SEARCH(" ? ",B2)-1),B2)
Just recently, my client has started to have a first and last initial in Excel. I have not been able to expand this formula to find first and last initial.
I'm currently breaking the whole name with text to column, using the length function in the first column to add a peoriod. Then stitch the name back again.
So I have a working "grind it out" way. But it would be great to be able to do this with one formula. If it can't be done, so be it.
Thank you so much in advance,
Ed