Using CountIfs with several criteria including names, status, and date range
I've created a sheet to build metrics from a very large source sheet. I'm trying to count based on the following:
- the column {Module 3 - Section Owner} matches a cell in this metric sheet in the "Primary Column"
- a Date in the {End Date} that is between Today() and the next 7 days. I created three cells that determine what is a) Today, b) Time to Add (7 days), and c) end date of range, which is a + b.
- {Module 3 - Status} matches the header in the table.
All the {} are the formula ranges from the full column I've set to reference the source sheet for the.
Here is what the table looks like:
And here is the current formula I've been trying:
=COUNTIFS({Module 3 - Section Owner}, $[Primary Column]@row, {End Date}, >= $Date$1, {End Date}, <= $Date$81), {Module 3 - Status}, [Column3]$72)
Here is an screen shot of the columns in the source sheet:
Best Answer
-
Try this:
=COUNTIFS({Module 3 - Section Owner}, $[Primary Column]@row, {End Date}, AND(@cell >= $Date$1, @cell <= $Date$81), {Module 3 - Status}, [Column3]$72)
Regards,
Jeff Reisman
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
Answers
-
Try this:
=COUNTIFS({Module 3 - Section Owner}, $[Primary Column]@row, {End Date}, AND(@cell >= $Date$1, @cell <= $Date$81), {Module 3 - Status}, [Column3]$72)
Regards,
Jeff Reisman
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
-
It worked! Thank you so much!
-
Great! Sometimes Smartsheet functions can act strangely when the same range is listed twice in a formula. Using the AND function or the OR function to evaluate a range for two criteria simultaneously often helps.
Regards,
Jeff Reisman
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64K Get Help
- 410 Global Discussions
- 220 Industry Talk
- 459 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 137 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!