It appears your ranges are not contiguous, so...
Set up a table of three columns. Put the lower bound of each of your ranges
in the left most column, say A1:A9. The upper bound is in B1:B9, and the
number to be assigned is in C1:C9. If the number you are tsting is in D1,
then use this formula:
=SUMPRODUCT(--(A1:A9<=D1),--(B1:B9=D1),C1:C9)
"rfryan61" wrote:
I am trying to find a way to use an IF statement in a way in which I'm not
sure it was meant to be used in excel, but maybe someone can help me work it
out.
What I need to do is assign a cell a different number according to what
range another cell's number falls into. For example if the number that is
entered into cell D1 falls between 1.5 and 1.8, I need a 7 to be placed in
cell D2. BUT, if that number falls between 2.3 and 2.7, I need a 5 to be
placed in cell D2. In all I have 9 ranges on numbers that dictate what
number should be place into cell D2. Is there a way to do this in excel?
|