Where do I put the IFERROR function to correct for year?

Carroll Wall
Carroll Wall ✭✭✭✭✭
edited 01/24/24 in Formulas and Functions

I have a column of dates. New rows are being added over time.

I count how many occur in each month.

In a separate metric sheet, have 12 formulas, 1 for each month, that look like this.

=COUNTIFS({Date Column}, IFERROR(MONTH(@cell), 0) = 1, {Date Column}, MONTH(@cell) = 1) for January

=COUNTIFS({Date Column}, IFERROR(MONTH(@cell), 0) = 2, {Date Column}, MONTH(@cell) = 2) for February, etc.

However, now that it is a new year, I want to exclude 2023 dates so I think I need to add an IFERROR and a YEAR(TODAY()) function,

Something like IFERROR(YEAR(@cell), 0) = YEAR(TODAY()))

but I am getting #unparseble.

Your insights would be greatly appreciated, my Smartsheet Community friends!

Stay Safe!

Carroll

Tags:

Best Answer

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!