Forum Discussion
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 AmairahSilver 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
- Hunter AdamsCopper Contributor
Thank you. That solved my issue.