Forum Discussion
Keith Herring
Jul 25, 2018Copper Contributor
IF AND function
Greetings, I need help with the following If/AND function\logic: IF (cell) value = 0 THEN return 20 ELSE IF value >= 0.1 AND <= 0.9 THEN return 15 ELSE IF value >= 1 AND <= 1.5 ...
- Jul 25, 2018
Hi Keith,
=IF(P2=0,20, IF(AND(P2>=0.1,P2<=0.9),15, IF(AND(P2>=1,P2<=1.5),10, IF(AND(P2>=1.6,P2<= 9.9),5, IF(P2>= 10,0,"not in conditions" )))))
or
=LOOKUP(P2,{-1,0.1,1,1.6,10},{20,15,10,5,0})
SergeiBaklan
Jul 25, 2018Diamond Contributor
Hi Keith,
=IF(P2=0,20, IF(AND(P2>=0.1,P2<=0.9),15, IF(AND(P2>=1,P2<=1.5),10, IF(AND(P2>=1.6,P2<= 9.9),5, IF(P2>= 10,0,"not in conditions" )))))
or
=LOOKUP(P2,{-1,0.1,1,1.6,10},{20,15,10,5,0})
Keith Herring
Jul 25, 2018Copper Contributor
Thanks much, Sergei!!!
- SergeiBaklanJul 25, 2018Diamond Contributor
You are welcome