Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there an efficient way to searching from the bottom of a range up?
I have this: for counter = 1 to 200 if cells(200-counter, 1) = "blah") then... endif next counter |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
for counter = 200 to 1 Step -1
if cells(200-counter, 1) = "blah") then... end if next counter "J@Y" wrote in message ... Is there an efficient way to searching from the bottom of a range up? I have this: for counter = 1 to 200 if cells(200-counter, 1) = "blah") then... endif next counter |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
if it is an Excel range, cannot you use the built-in functionality? Something like: Selection.Find(What:="blah", After:=ActiveCell, LookIn:=xlFormulas, LookAt _ :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlPrevious, MatchCase:= _ False).Activate i.e. use the SearchDirection parameter hth (and is correct !) Tim "Trevor Shuttleworth" wrote in message ... for counter = 200 to 1 Step -1 if cells(200-counter, 1) = "blah") then... end if next counter "J@Y" wrote in message ... Is there an efficient way to searching from the bottom of a range up? I have this: for counter = 1 to 200 if cells(200-counter, 1) = "blah") then... endif next counter |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
for counter = 200 to 1 step -1
if cells(counter, 1) = "blah") then... endif next counter or more convoluted: for counter = 1 to 200 if cells(201-counter, 1) = "blah") then... endif next counter J@Y wrote: Is there an efficient way to searching from the bottom of a range up? I have this: for counter = 1 to 200 if cells(200-counter, 1) = "blah") then... endif next counter -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
search an array in reverse (bottom to top) order | Excel Discussion (Misc queries) | |||
Loop a range from bottom up | Excel Programming | |||
Adding in row at bottom of range | Excel Programming | |||
starting from bottom of range instead of top | Excel Programming | |||
How to: Add blank row at bottom of range | Excel Programming |