Forum Discussion
itsmezee17
Sep 30, 2021Copper Contributor
EXCEL IF function with multiple AND/OR conditions
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?
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")
3 Replies
- SergeiBaklanDiamond Contributor
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")
- itsmezee17Copper ContributorThat worked. Thank you.