Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Loop and find less than...
Is there a way to find cells in a loop that are less than a certian value?
something like that idea, but I know this doesn't work... Set rngFound = rngToSearch.Find <= (Range("a56").Value) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Loop and find less than...
Dim rng as Range, cell as Range
for each cell in Range("B1:B100") if cell.Value < Range("A56").Value then if rng is nothing then set rng = cell else set rng = Union(rng,cell) end if End if Next if not rng is nothing then rng.Select End if -- Regards, Tom Ogilvy "John" wrote in message ... Is there a way to find cells in a loop that are less than a certian value? something like that idea, but I know this doesn't work... Set rngFound = rngToSearch.Find <= (Range("a56").Value) |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Loop and find less than...
Thank you sir!
"Tom Ogilvy" wrote: Dim rng as Range, cell as Range for each cell in Range("B1:B100") if cell.Value < Range("A56").Value then if rng is nothing then set rng = cell else set rng = Union(rng,cell) end if End if Next if not rng is nothing then rng.Select End if -- Regards, Tom Ogilvy "John" wrote in message ... Is there a way to find cells in a loop that are less than a certian value? something like that idea, but I know this doesn't work... Set rngFound = rngToSearch.Find <= (Range("a56").Value) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find loop doesn't loop | Excel Discussion (Misc queries) | |||
Find & loop in VBA | Excel Discussion (Misc queries) | |||
Find in a loop | Excel Programming | |||
Find, Findnext VBA Loop | Excel Programming | |||
Find loop | Excel Programming |