View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Charlie Charlie is offline
external usenet poster
 
Posts: 703
Default Loop a range from bottom up

For iRow = LastRow To FirstRow Step -1
Debug.Print Cells(iRow, "A")
Next iRow


"Who I Am" wrote:

If I use something like

for each c in range()
next c

the loop will start from the first cell down.

How can I loop from bottom up? Here is the scenario:

1/1/2006
...
...
...
3/31/3006
3/31/2006
3/31/2006

I need the address of the last occurance of 3/31/2006, so I can count
all records from 1/1 to 3/31. If I only loop from top down, the first
occurance of 3/31 isn't want I want.

I will use the start cell address (1/1/2006) and end cell address
(3/31/2006) in another function.

Thanks in advance.