View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Emory Richter Emory Richter is offline
external usenet poster
 
Posts: 10
Default RTrim as a variable

I would like to use RTrim
to remove spaces from a list of single words.

Every example of RTrim I can find on the web
seems to be for a paticular fixed string like "Hello World ".

If I want to use: RTrim( text )
with 'text' as a variable
to loop down a list, if possible
and remove the trailing spaces
can I substitute something for 'text'
to identify the cell contents ?

That is, how would the following look?

Sub Macro1()
Do Until ActiveCell.Formula = ""
ActiveCell.Offset(1, 0).Select
RTrim( text )
Loop

Thank you,
Emory