Forum Discussion

itsmezee17's avatar
itsmezee17
Copper Contributor
Sep 30, 2021
Solved

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?

 

 

 

 

 

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

3 Replies

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

Resources