How to count date occurrences within a month
I have a sheet that identifies the date of new survey submissions and the date of responses. I am looking to count the dates that occur within specific months/years for a report... Here is what I am using, which is currently giving me a response of 0, though I know there are multiple occurrences for September.
The ranges are in date columns.
=COUNTIFS({*MASTER TABLE* Range 4}, "MONTH(@cell)" = 9)
I have also tried =COUNTIFS({*MASTER TABLE* Range 4}, "MONTH(@cell)" = 09)
Any Ideas?
Best Answer
-
Hi @Merritt R,
The criteria should not be in the quotation marks as this will mean the COUNTIFS is looking for that as text, rather than as a function.
However, checking this you'll get an error. You can get round this easily though:
=COUNTIFS({*MASTER TABLE* Range 4},<>"",{*MASTER TABLE* Range 4}, MONTH(@cell) = 9)
Since your relevant values will have both a month of 9 (for September) and not be blank.
Hope this helps, but any problems/questions just ask! 🙂
Answers
-
Hi @Merritt R,
The criteria should not be in the quotation marks as this will mean the COUNTIFS is looking for that as text, rather than as a function.
However, checking this you'll get an error. You can get round this easily though:
=COUNTIFS({*MASTER TABLE* Range 4},<>"",{*MASTER TABLE* Range 4}, MONTH(@cell) = 9)
Since your relevant values will have both a month of 9 (for September) and not be blank.
Hope this helps, but any problems/questions just ask! 🙂
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.6K Get Help
- 405 Global Discussions
- 215 Industry Talk
- 456 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 297 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!