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
- Customer Resources
- 65.9K Get Help
- 429 Global Discussions
- 147 Industry Talk
- 487 Announcements
- 5.2K Ideas & Feature Requests
- 86 Brandfolder
- 152 Just for fun
- 74 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 305 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!