View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JW[_2_] JW[_2_] is offline
external usenet poster
 
Posts: 638
Default Delete Spaces from text download

To get rid of leading and trailing spaces:
Range("A1").Value=Trim(Range("A1").Value

To get rid of all spaces:
Range("A1").Value = Replace(Range("A1").Value, " ", "")

Les wrote:
Hi all, i am pulling a text file into excel and the one field, e-mails, has a
lot of spaces of variable size in it, is there a way i can delete these with
code ??

Any help would be greatly appreciated...
--
Les