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
- 62.4K Get Help
- 364 Global Discussions
- 202 Industry Talk
- 430 Announcements
- 4.4K Ideas & Feature Requests
- 137 Brandfolder
- 129 Just for fun
- 128 Community Job Board
- 446 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 284 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!