Forum Discussion
Multiple IF, AND, OR in excel won't work
- Aug 12, 2022
The problem as fixed above is that the 2nd IF statement has a big OR statement as the conditional but no statements for the if true or if false result:
=IF($H$6<F11-15,1, IF( OR( IF( AND($H$6>F11,A12<0,B12<0,C12<0,D12<0,E12<0),0,1), (IF(AND($H$6>F11,A12>0,B12<0,C12<0,D12<0,E12<0),0,1)), (IF(AND($H$6>F11,A12>0,B12>0,C12<0,D12<0,E12<0),0,1)), (IF(AND($H$6>F11,A12>0,B12>0,C12>0,D12<0,E12<0),0,1)), (IF(AND($H$6>F11,A12>0,B12>0,C12>0,D12>0,E12<0),0,1)) ), {if true do this}, {if false do this} ) )alternatively maybe this would work for you:
=IFS($H$6<F11-15,1, OR($H$6<=F11,E12>=0),{true}, A12<=0,{true}, B12<=0,{true}, C12<=0,{true}, D12<=0,{true}, TRUE, {false} )again I will not assume what value you wanted for the result of that IF() statement being TRUE or FALSE
a b c d e f g h i
27
28 test below== false =IF(AND(E30,E31),"true","false")
29 e29 FALSE =E32<F32
30 e30 FALSE =AND(E32<F32,E32<G32)
31 e31 FALSE AND(E32<F32,E32>G32)
32 orig=== "=IF(E32<F32,1,
IF(OR(AND(E32<F32,E32<G32),
AND(E32<F32,E32>G32)), ""True"", ""False""))" ====>> 3 2 4 = formula answers
33 e29 e30 e31
34
35
36
37
value(a2), value(b2)...... it takes what might be a text and changes it to a numeric value. but what might be easier is to first check your column or row of data using the type command, type(a2), .... it will tell you whether your data is 1 for numeric or 2 for text.
I again looked at your original formula and still don't see anything wrong with it. But I've been wrong before. I would go along with the person 's formula that works for you.
odds are, if you retyped the formula from scratch, it will work for you. imo, bob