3 ANDS + 1 OR

  • Thread starter Thread starter Gator Girl
  • Start date Start date
G

Gator Girl

in cell M13

=IF(AND($D13>0,$L13<($E13-$F13),AU13>=AV13),AV13,"NO")
returns a date in if all 3 statements are true, otherwise no.
I want an OR condition IF N13>"", AV13 to come in before the "NO",
so that if all 3 of the first statements are true OR the last statement is
true, the date from AV13 results.

I've fooled around with this for 2 hours now, and I GIVE UP.

Once again, I am turning to the experts to save me.

Thanks
 
Two ways are
=IF(OR(AND($D13>0,$L13<($E13-$F13),AU13>=AV13),N13>""),AV13,"NO")
=IF($D13>0)*($L13<($E13-$F13))*(AU13>=AV13))+(N13>""),AV13,"NO")

The latter form generalizes more easily. Multiplicaion of logicals behaves
like AND, addition of logicals behaves like OR, and you can use parentheses
as needed to control the order of evaluation.

Jerry
 
Back
Top