View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
OssieMac OssieMac is offline
external usenet poster
 
Posts: 2,510
Default AddPeriodToCharaceter

Assume John M Doe is in cell A1. Use following following formula in an
adjacent cell to replace the second instance of a space with a period and a
space. Requires there to be only one space between John M and between M Doe
or ir will place the comma at the second space.

=SUBSTITUTE(A1," ",". ",2)

For names without the initial and second space, it will simply return the
name as is.

If you have instances of 2 spaces between the names and initials, you can
use Find and Replace to replace all instances of 2 spaces with one space.
Simply type 2 spaces in Find what and one space in Replace with.

--
Regards,

OssieMac


"gh" wrote:

I have a column with a middle initial in some of the cells. I would
like to add a period after the initial and the cells without an initial,
leave empty. Is there a function for this?

TIA