Forum Discussion

Hunter Adams's avatar
Hunter Adams
Copper Contributor
Sep 26, 2018
Solved

Using IF and AND function

Here is my problem:
The logical test in the IF function should determine if the staff members Service Years is greater than 4 AND the staff members Leadership Training status is "Yes". Use structured references. The function should return "Yes" if a staff member meets both of those criteria and "No" if a staff member meets none or only one of those criteria.

 

Here is my formula: 
=IF(AND([@[Service Years]]>4="Yes",[@[Leadership Training]]="Yes"),"Yes","No")

 

Here is my issue: I am getting "No" in all cells when some are "Yes". 

 

I appreciate the help

  • Hi Hunter,

     

    The first logical test in the AND function is not right!

     

    You should replace this:

    =IF(AND([@[Service Years]]>4="Yes",[@[Leadership Training]]="Yes"),"Yes","No")

     

    With this:

    =IF(AND([@[Service Years]]>4,[@[Leadership Training]]="Yes"),"Yes","No")

     

    Hope this helps you

    Regards

2 Replies

  • Haytham Amairah's avatar
    Haytham Amairah
    Silver Contributor

    Hi Hunter,

     

    The first logical test in the AND function is not right!

     

    You should replace this:

    =IF(AND([@[Service Years]]>4="Yes",[@[Leadership Training]]="Yes"),"Yes","No")

     

    With this:

    =IF(AND([@[Service Years]]>4,[@[Leadership Training]]="Yes"),"Yes","No")

     

    Hope this helps you

    Regards