# 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.

• You would use something along the lines of (Jan 2023):

=COUNTIFS({Date Column}, AND(IFERROR(MONTH(@cell), 0) = 1, IFERROR(YEAR(@cell), 0) = 2023))

• 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).

• Happy to help. 👍️

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!