Search Cells for a Number Between a Specified Min & Max.

Excel and most MS Office Applications,
have a Find feature than can be use to find a specified value, or
text string, in a range, Worksheet, or Workbook. However, no such
feature exists where we can tell Excel to find the first occurrence of a
number that is between a Minimum number and a maximum number. We can
however use some Excel VBA
macro code to do it
for us.

Loops Are Too Slow

Most would go with a
loop
to
get a number
between a nominated range
. However, this can be extremely slow and
horribly inefficient if the Worksheet contain thousands of used
cells. The method below makes use of the SpecialCells method to
ensure we are only checking numeric cells.

Search All Cells or Only Selection

The
code works in the same way as the standard Find feature does. That is,
search ALL cells on the Worksheet if only a single cell is selected, or
search ONLY the selected cells if more than one cell is selected.

If
will locate and select the first cell, that has a value between
(not equal to) the specified min and max. It searches by rows. Note,
it will not locate a zero value.