Thread: TRIM
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
kassie kassie is offline
external usenet poster
 
Posts: 515
Default TRIM

With your name in E1, insert a new column F.
Enter in F1 =TRIM(E1).
Select F1, copy, and paste special as value in E1. Your spaces should be
gone. Delete Col F

--
HTH

Kassie

Replace xxx with hotmail


"Nikki" wrote:

Cell E1 has the name John followed by 13 spaces (comes out of the database
this way). How do I remove the 13 spaces? I tried trim((e1)&" "&g1) but it
doesn't work. Please help as this is driving me crazy. Thanks to those of you
who made suggestions already. I also tried the code in a simple Macro that is
application.trim(range("e1")) and can't seem to get that to work either.

Thanks
Nikki