Hi Julie,
In general, it is easier to look up a value that is to the right of the
threshold value. You could introduce an extra column, with just "=A1" as
formula.
Also, you don't really need the MAX column.
Let's assume your Code is in column A, Low in column B, High in column C and
a copy of A in D. The value to be looked up is in E1.
Then the formula would be:
=VLOOKUP(E1,B1:D3,2)
If for some reason you can't insert a new column, use a combination of
MATCH() and INDEX() functions.
Post again if you need help with that.
--
Kind Regards,
Niek Otten
Microsoft MVP - Excel
"JulieD" wrote in message
...
Hi All
can't quite figure out what formula to use
if i have the number 27.568 in a cell
and i have a table in sheet2 with the following structure
CODE......LOW.....HIGH
A.......26.258.......26.358
B.......27.259........27.359
C.......27.566........27.666
how do i lookup the 27.568 and return the C (as it falls within this
range) - additionally, sometimes the value i'm looking up might match
either a LOW or HIGH and then the associated code needs to be returned.
Cheers
JulieD
|