SOLVED

EXCEL IF function with multiple AND/OR conditions

Copper Contributor

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?

 

 

 

 

 

3 Replies
best response confirmed by allyreckerman (Microsoft)
Solution

@itsmezee17 

 

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")

That worked. Thank you.

@itsmezee17 

As variant

=IF( MMULT(--(A1:D1="yes"), {10;1;1;1}) > 11, "yes", "no" )
1 best response

Accepted Solutions
best response confirmed by allyreckerman (Microsoft)
Solution

@itsmezee17 

 

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")

View solution in original post