Countif Formula Help!
Hello
I have a formula at the moment that is calculating the tenure based on different ranges. The below is example is for those with tenure between 1 and 5 years:
=COUNTIF({GOAL C8 Participant Tracker Range 1}, ">1") - COUNTIF({GOAL C8 Participant Tracker Range 1}, ">5")
However, I want to add another criteria to this formula so that it will only count those who have an "Active" or "On Leave" status in the reference sheet.
I can't get this to work. Any suggestions?
Thanks in advance!
Best Answers
-
hi @Kate123 , you need a countifs formula with an "OR" variable. Try this:
=COUNTIFS({GOAL C8 Participant Tracker Range 1}, ">1", {New Ref Column}, OR(@cell="Active", @cell="On Leave")) - COUNTIFS({GOAL C8 Participant Tracker Range 1}, ">5",{New Ref Column}, OR(@cell="Active", @cell="On Leave"))
The "{New Ref Column}" is the column containing the "Active" or "On Leave" criteria.
-
Thanks, Lucas! This worked great!
Answers
-
hi @Kate123 , you need a countifs formula with an "OR" variable. Try this:
=COUNTIFS({GOAL C8 Participant Tracker Range 1}, ">1", {New Ref Column}, OR(@cell="Active", @cell="On Leave")) - COUNTIFS({GOAL C8 Participant Tracker Range 1}, ">5",{New Ref Column}, OR(@cell="Active", @cell="On Leave"))
The "{New Ref Column}" is the column containing the "Active" or "On Leave" criteria.
-
Thanks, Lucas! This worked great!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63K Get Help
- 380 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 302 Events
- 34 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!