Thread: TrailingSpaces
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default TrailingSpaces

Hi
works for me. the entry 'John H.' will result in 'H.' without any
blanks between 'H' and '.'??
Frank

jb wrote:
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