Calculate # of Incidents Within A Month
I have a sheet that is recording data, we have a field for the date of an incident. I have a Roll Up sheet that is counting the data from the main one, with a number of different items. Is there a way to have a formula that counts the # of rows that have a date in a specific month? I want to be able to pull the number of incidents in each month of the year.
Best Answer
-
You would use something along the lines of (Jan 2023):
=COUNTIFS({Date Column}, AND(IFERROR(MONTH(@cell), 0) = 1, IFERROR(YEAR(@cell), 0) = 2023))
Answers
-
You would use something along the lines of (Jan 2023):
=COUNTIFS({Date Column}, AND(IFERROR(MONTH(@cell), 0) = 1, IFERROR(YEAR(@cell), 0) = 2023))
-
@Paul Newcome here's a snip of my two sheets.
This is the formula I've put in: =COUNTIFS({Incident Date}), AND(IFERROR(Month({Incident Date}, 0) = 1,IFERROR(Year({Incident Date}, 0) = 2023)), but I'm getting an error.
On the Incident Report, the "Date of Incident" column reference name is "Incident Date".
-
Remove the closing parenthesis after the first cross sheet reference, and the text inside of the YEAR and MONTH functions should be @cell exactly as I have in my example.
All you should need to change from my example is that one single cross sheet reference (and of course month and year numbers for each month and year combo).
-
Got it, thank you!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!