CountIF with Criteria including date range
Hello,
I'm currently trying to create a countifs formula to count the number of "issue type"(column) "story" where it meets certain criteria including falling within the next 30 days.
My base formula works here:
=COUNTIFS([Issue Type]:[Issue Type], "Story", Labels:Labels, "Groomed", Status:Status, "To Do")
However, when I try to add criteria for these "stories" that have a start date within 30 days I get the INVALID OPERATION error. My current formula for it (that is not working) is here:
=COUNTIFS([Issue Type]:[Issue Type], "Story", Labels:Labels, "Groomed", Status:Status, "To Do", [Target Start Date]:[Target Start Date] < TODAY(+30))
Any Idea what I'm doing wrong here? Help appreciated!
Thanks
Best Answer
-
Try using an @cell reference in your CONTAINS function.
=COUNTIFS([Issue Type]:[Issue Type], "Story", Labels:Labels, CONTAINS("Groomed", @cell), Status:Status, "To Do", [Target Start Date]:[Target Start Date], <TODAY(30))
Answers
-
I should note that some of the "Target Start Date" Fields are blank, would this cause an issue?
-
I've gotten the following formula to run, however it returns "0" based on the criteria, which isn't right.
=COUNTIFS([Issue Type]:[Issue Type], "Story", Labels:Labels, "Groomed", Status:Status, "To Do", [Target Start Date]:[Target Start Date], <TODAY(30))
-
Update formula as Labels is a string that can have more text than a single entry:
=COUNTIFS([Issue Type]:[Issue Type], "Story", Labels:Labels, CONTAINS("Groomed", Labels:Labels), Status:Status, "To Do", [Target Start Date]:[Target Start Date], <TODAY(30))
Still no results, am I using the Contains function correctly?
-
Try using an @cell reference in your CONTAINS function.
=COUNTIFS([Issue Type]:[Issue Type], "Story", Labels:Labels, CONTAINS("Groomed", @cell), Status:Status, "To Do", [Target Start Date]:[Target Start Date], <TODAY(30))
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!