View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Formula for Replacing Text in a String?

=IF(LEFT(A1,4)=", , ",MID(A1,5,LEN(A1)-5),A1)

You did say remove the last character?
Above errors if there is not at least 1 character following your string.
Fixable if needs but a longer formula.

Regards,
Peter T

I'd like to make a formula (NOT USING VBA) that would replace, in a list

of
characters, all instances of the following with nothing:

, ,


(That's a comma followed by a space, followed by a comma, followed by a
space.)

If possible, the formula would also eliminate the last character in the
string if it's a comma.

Thanks,

Dave