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
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!