Thread: TrailingSpaces
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default TrailingSpaces

Try
=IF(ISERROR(FIND("
",Trim(C124),1)),"",RIGHT(Trim(C124),LEN(Trim(C124 )) -FIND("
",Trim(C124),1))& ".")

--
Regards,
Tom Ogilvy


"jb" wrote in message
...
I use the following formula to copy the middle initial and add a . after
it. The column being copied from has the firstname and middle initial
in the cells(John H). This has been working in thepast, but now it puts
spaces between the midddle initial and . when it is copied( John
.). How can I trim the trailing from the middle initial before adding
the period.

=IF(ISERROR(FIND(" ",C124,1)),"",RIGHT(C124,LEN(C124) -FIND("
",C124,1))& ".")

Thanks