# Count Number of Cells within 2021 or specified Year

Options
✭✭✭
edited 06/09/21

Hey Folks,

This comes up alot and I tried my best. I am building a metrics sheet for a dashboard, and need to reference the ship date column on my other sheet. I need to count the number of ship dates in 2021 YTD (so Jan 1 - TODAY). So I can count total shipped YTD. Here is what I got, getting Unparseable. PM Backlog Range 1 is the shipping date column referenced from my other sheet.

=COUNTIFS({PM Backlog Range 1}, IFERROR(YEAR({PM Backlog Range 1}, 0)=year(TODAY))))

• ✭✭✭✭✭✭
Options

I think that you are just a little off, but I think this one should work....

=COUNTIF({PM Backlog Range 1}, IFERROR(YEAR(@cell), 0) = YEAR(TODAY()))

• ✭✭✭✭✭✭
Options

I think that you are just a little off, but I think this one should work....

=COUNTIF({PM Backlog Range 1}, IFERROR(YEAR(@cell), 0) = YEAR(TODAY()))

• ✭✭✭
Options

THANK YOU

• ✭✭✭
Options

What if I want to Count YTD? It is also counting stuff in November that hasn't shipped yet.

• ✭✭✭✭✭✭
Options

you could add another condition I believe something like...

=COUNTIFS({PM Backlog Range 1}, IFERROR(YEAR(@cell), 0) = YEAR(TODAY()),{PM Backlog Range 1},IFERROR(Month(@cell), 0) <= MONTH(TODAY()))

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!