Forum Discussion
Scott Cackett
Dec 11, 2017Copper Contributor
Excel Formula help needed
Hi everyone,
I am trying to create a formula to help me increase/decrease insulin levels to help treat my diabetes.
Hopefully this makes sense. I need a formula to do the below:
If a number...
Haytham Amairah
Dec 11, 2017Silver Contributor
Scott,
What you need is something like this:
=IF(AND(A1>=-2,A1<=2),"No Change", IF(AND(A1<-2,A1>=-4),"-0.1", IF(AND(A1<-4,A1>=-6),"-0.2", IF(AND(A1>2,A1<=4),"+0.1", IF(AND(A1>4,A1<=6),"+0.2", IF(OR(A1>6,A1<-6),"Review"))))))
Scott Cackett
Dec 11, 2017Copper Contributor
=IF(AND(H35>=-1.9,H35<=1.9),"No Change",IF(AND(H35<=-2,H35>=-3.9),"-0.1",IF(AND(H35<=-4,H35>=-5.9),"-0.2",IF(AND(H35<=-6,H35>=-7.9),"-0.3",IF(AND(H35<=3.9,H35>=2),"+0.1",IF(AND(H35<=5.9,H35>=4),"+0.2",IF(AND(H35<=7.9,H35>=6),"+0.3",IF(OR(H35<=-7.9,H35>=8),"Review!"))))))))
I've built upon the formula and am now trying to have it that if cell H35 states "0.0", that the cell will state "No Change"
any ideas?
- SergeiBaklanDec 13, 2017Diamond Contributor
Just in case, alternative formula could be
=LOOKUP(H35, {-9E+99,-7.89999,-5.9,-4,-1.99,2,4,6,8}, {"Review!","-0.3","-0.2","-0.1","No Change","+0.1","+0.2","+0.3","Review!"} )or like, depends on boundaries and precision.
- Haytham AmairahDec 11, 2017Silver Contributor
This formula already supports it!
If the cell's value is 0 , the formula will returns "No Change"!
But this in case of the cell's data type is numeric not text!