SOLVED

Using IF and AND function

Copper Contributor

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

2 Replies
best response confirmed by Hunter Adams (Copper Contributor)
Solution

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

Thank you. That solved my issue. 

1 best response

Accepted Solutions
best response confirmed by Hunter Adams (Copper Contributor)
Solution

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

View solution in original post