Hi, I am trying to calculate the number of incidents that have occurred in a month.
Using the following formula getting unparseable
=COUNTIF([Date:Date], MONTH(@cell)=11)
Best Answer
-
You're close...the range reference should be [Date]:[Date] OR Date:Date
=COUNTIF(Date:Date, MONTH(@cell)=11)
However, I think you'll still run into an INVALID DATE TYPE error.
You could also try this for a specific month and year.
=COUNTIF(Date:Date, AND(@cell >= DATE(2021, 11, 1), @cell <= DATE(2021, 11, 30))
Answers
-
You're close...the range reference should be [Date]:[Date] OR Date:Date
=COUNTIF(Date:Date, MONTH(@cell)=11)
However, I think you'll still run into an INVALID DATE TYPE error.
You could also try this for a specific month and year.
=COUNTIF(Date:Date, AND(@cell >= DATE(2021, 11, 1), @cell <= DATE(2021, 11, 30))
-
Thank you Jason. =COUNTIF(Date:Date, AND(@cell >= DATE(2021, 11, 1), @cell <= DATE(2021, 11, 30)) this works. If i want to calculate different months ??
-
If you have separate columns for each month, then you can just copy this formula and change the DATE values to say DATE(2021, 12, 1) and DATE(2021,12,31). Since it's using greater or equal AND less than or equal, it will work with any range of dates.
With your formula having only MONTH(@cell) = 11, then it would look for November of any year, unless you use COUNTIFS and add a second criteria for YEAR(@cell).
-
That is really great; thank you Jason
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63K Get Help
- 379 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 305 Events
- 34 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!