Lyndsweb wrote:
In Excel 2003, I am using an IF formula with greater than (>) and less than (<). But I can't get the correct sequence when wanting to say greater than AND less than together in the formula. Please help!
DATA:
P Q R
ROW13 50 6 3000
ROW14 80 9 3500
ROW15 110 12 4000
ROW16 140 15 4500
The problem is as follows: If B29 is less than or equal to 50, then return R13; If B29 is greater than 50 but less than 80, then return R14; If B29 is greater than 80 but less than 110, then return R15; If B29 is greater than 110 but less than 140, then return R16, etc...
Arguably, it would be better to use VLOOKUP. But you do not provide sufficient information to reconstruct things so that VLOOKUP will work exactly as you specify, unless we make some assumptions.
The IF expression can be:
=IF(B29<=50,R13,IF(B29<=80,R14,IF(B29<=110,R15,IF(B29<=140,R16,R17))))
I am not sure what "etc..." means. Presumably, you have more range limits to test; I assume just one more (R17). But that is why VLOOKUP is a better solution. Note that with Excel 2003, you are limited to 8 range limits -- 7 nested IF expressions if you
use no other functions.