Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
Is there a way to use a For Each...Next loop but have VBA step through the collection from the last element to the first? I'm trying to step through a range and delete rows that don't meet certain criteria, and I need to work from the bottom up. I know I can do it by counting the rows in the range and using: for i = lastrow to 1 step -1 But I figured it'd be less lines of code if something existed like this: for each cl in rng step backwards Not a big deal if it doesn't, but figured it was worth asking. Thanks to all. Mike |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Stepping in to a cell | Excel Discussion (Misc queries) | |||
Stepping through Code | Excel Discussion (Misc queries) | |||
Stepping Through vs. Play | Excel Discussion (Misc queries) | |||
stepping down rows | Excel Programming | |||
Stepping through a column using FOR/NEXT | Excel Programming |