Sep 30 2021 05:42 AM
Hello,
I am trying to complete an IF function with multiple conditions but cannot seem to figure it out.
Any help would be much appreciated.
The conditions I am trying to satisfy are, IF:
A1="yes" AND 2 out of the 3 cells (B1, C1, D1)= "yes", then return yes.
Could anyone help me with with?
Sep 30 2021 06:37 AM
Solution
If you meant: exactly two out of the three:
=IF(AND(A1="yes",COUNTIF(B1:D1,"yes")=2),"yes","no")
If you meant: at least two out of the three:
=IF(AND(A1="yes",COUNTIF(B1:D1,"yes")>=2),"yes","no")
Sep 30 2021 07:00 AM
Sep 30 2021 06:37 AM
Solution
If you meant: exactly two out of the three:
=IF(AND(A1="yes",COUNTIF(B1:D1,"yes")=2),"yes","no")
If you meant: at least two out of the three:
=IF(AND(A1="yes",COUNTIF(B1:D1,"yes")>=2),"yes","no")