Enter the following data in a section of your spreadsheet (say J2:K7)
0 70%
1.0001 60%
1.4001 50%
2.0001 30%
2.5001 30%
3.0001 30%
put your number in cell a1
put this formula in cell b1 =VLOOKUP(A1,$J$2:$K$7,2,1)
The way it works, is the formula looks down column J and compares the
number in A1 against the first number if finds. It keeps going down
the column until it gets a number *larger *than the one in cell A1. It
the goes back up 1 row and takes the number from column K as the result.
Because you want the range to be <= to 1.4 (for example), you need a
number slightly bigger than 1.4 ie 1.4001. As described above, when
the search finds 1.4001, it then goes back and takes 60% as the value.
If there was a perfect match for 1.4, it would take the value 50% (not
what you want). You therefore need to set the 1.4001 etc to a level of
accuracy (ie decimal points) lower than the number in cell A1.
Matt
--
Mallycat
------------------------------------------------------------------------
Mallycat's Profile:
http://www.excelforum.com/member.php...o&userid=35514
View this thread:
http://www.excelforum.com/showthread...hreadid=552889