Thread: replace space
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Vasant Nanavati Vasant Nanavati is offline
external usenet poster
 
Posts: 1,080
Default replace space

You would run a macro like the following with the relevant worksheet active.

Sub RemoveTralingSpaces()
Dim c As Range
For Each c In Range("A1:D90")
c = RTrim(c)
Next
End Sub
__________________________________________________ ______________________


"sham" wrote in message
...
i am not able to replace the space in cells
ex: i have a data range of a1 to d90
in that all the cell have the spaces at the end
now i wanted to remove all those at a time