# Count dates within a specific range

I am collecting performance data for my project. I have a report that contains all of the data I want to analyze and report statistics on. I'd like to look through a column containing dates including some empty cells, and count how many cells contain dates within a specific range. I'd like to count cells containing dates from February 2021 for example. I attempted using countifs and just a simple if, as well as a not(isblank()) but I keep getting the unparseable error.

• ✭✭✭✭✭✭

Is the reference data on an actual report or on a sheet separate from where you want to display these metrics?

• The reference data is in a report, but all of the data in the report comes from a few different sheets, so I can technically reference sheets to perform calculations as well. I am attempting to make all these calculations in a separate sheet.

• ✭✭✭✭✭✭

Ok. Cross sheet formulas cannot reference a report. So we will have to figure out a way to reference the sheets themselves.

Are all of the sheets set up the same (as if from a template), and are you pulling the same data from all of the sheets?

• Yes all of the sheets containing data appear to be created from a template and have the same format. The date I'm looking for is in the same column for the couple of sheets but like I said the column contains blank cells as well.

• ✭✭✭✭✭✭

Ok. There are a few ways to do this. The easiest to set up (but probably the worst for growth) would be to use three separate COUNTIFS and add them together.

The example below would be for February 2021.

=COUNTIFS({First Sheet Date Column}, AND(IFERROR(YEAR(@cell), 0) = 2021, IFERROR(MONTH(@cell), 0) = 2)) + COUNTIFS({Second Sheet Date Column}, AND(IFERROR(YEAR(@cell), 0) = 2021, IFERROR(MONTH(@cell), 0) = 2)) + COUNTIFS({Second Sheet Date Column}, AND(IFERROR(YEAR(@cell), 0) = 2021, IFERROR(MONTH(@cell), 0) = 2))

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!