View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
TFS[_2_] TFS[_2_] is offline
external usenet poster
 
Posts: 3
Default For...next in reverse

try looping with a descending index (i.e. Step -1)

ex.

for i = sheets("sheet1").range("A100:A1").cells.count to 1 Step -1
do something on sheets("sheet1").range("A100:A1").cells(i)
next

-Todd

www.ManagementAnalytics.com

"Rod Jones" wrote:

Is it possible to do a for each..next loop through a range in reverse e.g

dim grCell as range

for each grCell in sheets("sheet1").range("A100:A1")
..do something here
next grCell

I've look through the help files but no luck.
Thank you for your time