3 ANDS + 1 OR

3 ANDS + 1 OR

Post by R2F0b3IgR2 » Sat, 07 Mar 2009 10:11:42


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
 
 
 

3 ANDS + 1 OR

Post by YmFwZWx0em » Sat, 07 Mar 2009 10:44:16

=IF(OR(AND($D13>0,$L13<($E13-$F13),AU13>=AV13),N13<>""),AV13,"NO")

 
 
 

3 ANDS + 1 OR

Post by SmVycnkgVy » Sat, 07 Mar 2009 10:46:18

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
 
 
 

3 ANDS + 1 OR

Post by R2F0b3IgR2 » Sat, 07 Mar 2009 10:53:28

A THOUSAND THANK YOU'S