Forum Discussion
Adam Jalil
Apr 30, 2018Brass Contributor
Help on Excel IF Condition with AND or OR statement
Good afternoon, I need help with the following IF statement as it is not working as I want it to. =IF(AND(E1=”Carbon”,OR((F1<0.5,F1>2.1,G1<0,G1>1.5,H1<0,H1>0.5,I<=0,I1>0.3,J<0,J15>0.25,K1<0,K1>...
Gourab Dasgupta
Apr 30, 2018Iron Contributor
Hi
Try the following
=IF(OR(E1="Carbon",E1="God"),"Pass",IF(AND(F1<0.5,F1>2.1,G1<0,G1>1.5,H1<0,H1>0.5,I<=0,I1>0.3,J<0,J15>0.25,K1<0,K1>1.5),"Pass","Fail"))
Adam Jalil
Apr 30, 2018Brass Contributor
Hi Gourab,
Thanks for coming back but the formula doesn't work as your first IF statement works as it is always PASS but not the second IF(AND(F1<0.5,F1>2.1,G1<0,G1>1.5,H1<0,H1>0.5,I<=0,I1>0.3,J<0,J15>0.25,K1<0,K1>1.5),"Fail","Pass")) statement in which it needs to take <> data to see if its within the given numbers to PASS or FAIL.
Thanks for coming back but the formula doesn't work as your first IF statement works as it is always PASS but not the second IF(AND(F1<0.5,F1>2.1,G1<0,G1>1.5,H1<0,H1>0.5,I<=0,I1>0.3,J<0,J15>0.25,K1<0,K1>1.5),"Fail","Pass")) statement in which it needs to take <> data to see if its within the given numbers to PASS or FAIL.