Home > OS >  IF AND and IF OR in same formula
IF AND and IF OR in same formula

Time:09-17

The calculation should be carried out when the following conditions are met:

  • Lookups!B4=1
  • AND Lookups!B5=FALSE
  • AND Lookups!E8=2, OR Lookups!E8=3

The formula works when only one condition is set in Lookups!E8 as below:

=IF(AND(Lookups!B4=1,Lookups!B5=FALSE,Lookups!E8=2),100%-G50-G51,0) 

But when I try to add the OR function I get a FALSE error:

=IF(AND(Lookups!B4=1,Lookups!B5=FALSE),IF(OR(Lookups!E8=2,Lookups!E8=3),100%-H50-H51,0))

I've tried nesting the OR bit too but cannot get that to work either.

Please can someone help....thank you.

CodePudding user response:

I think you do not need second if. Nest OR() function inside AND() function. Try-

=IF(AND(Lookups!B4=1,Lookups!B5=FALSE,OR(Lookups!E8=2,Lookups!E8=3)),100%-H50-H51,0)
  • Related