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>...
Adam Jalil
Apr 30, 2018Brass Contributor
This formula works on individual cells=IF(AND((E1="Alloy"),OR(F1<0.5,F1>1.5,G1<0,G1>5,H1<0,H1>1,I1<0,I1>1,J1<2,J1>5,K1<11,K1>15)),"FAIL","PASS") but not when I add the Carbon and its cells into the formula
SergeiBaklan
Apr 30, 2018Diamond Contributor
Adam Jalil wrote:
This formula works on individual cells=IF(AND((E1="Alloy"),OR(F1<0.5,F1>1.5,G1<0,G1>5,H1<0,H1>1,I1<0,I1>1,J1<2,J1>5,K1<11,K1>15)),"FAIL","PASS") but not when I add the Carbon and its cells into the formula
if continue it when
=IF(AND((E1="Alloy"),OR(F1<0.5,F1>1.5,G1<0,G1>5,H1<0,H1>1,I1<0,I1>1,J1<2,J1>5,K1<11,K1>15)),"FAIL",IF(AND((E1="Carbon"),OR(F1<0.5,F1>2.1,G1<0,G1>1.5,H1<0,H1>0.5,I1<=0,I1>0.3,J1<0,J1>0.25,K1<0,K1>1.5)),"FAIL","PASS"))
- Adam JalilApr 30, 2018Brass Contributor
Hi Sergei,
Thanks for the formulas but whatevery I try doesn't seem to work when I have cells like E15 onwards. I have attached the text excel document on the cells which I want and you can also see the formulas which you have given works on cells E1 onward on F3 and F6.
What I want is the data I have on cells E15 to K15 to work on those formulas...
Thanks a million
- SergeiBaklanApr 30, 2018Diamond Contributor
Adam, are you sure your F1:K1 are not % but decimal numbers? With per cents it works if
=IF(AND((E1="Alloy"),OR(F1<0.5%,F1>1.5%,G1<0,G1>5%,H1<0,H1>1%,I1<0,I1>1%,J1<2%,J1>5%,K1<11%,K1>15%)),"FAIL",IF(AND((E1="Carbon"),OR(F1<0.5%,F1>2.1%,G1<0,G1>1.5%,H1<0,H1>0.5%,I1<=0,I1>0.3%,J1<0,J1>0.25%,K1<0,K1>1.5%)),"FAIL","PASS"))
- Adam JalilApr 30, 2018Brass ContributorHi Sergei, Thank you as it works now on what I want :-)