Year Function
I have a date column [Updated on]. I a formula to count all the items in the column which occurred in 2021. I have the following so far. I am getting INVALID DATA TYPE.
=COUNTIF([Updated on]:[Updated on], YEAR(@cell) = YEAR(TODAY()))
Best Answers
-
Try this to accommodate blanks and other non-date values:
=COUNTIF([Updated on]:[Updated on], IFERROR(YEAR(@cell), 0) = YEAR(TODAY()))
-
That worked great. Thanks for the help.
Answers
-
Try this to accommodate blanks and other non-date values:
=COUNTIF([Updated on]:[Updated on], IFERROR(YEAR(@cell), 0) = YEAR(TODAY()))
-
That worked great. Thanks for the help.
-
Help Article Resources
Categories
Want to practice working with formulas directly in Smartsheet?
Check out the Formula Handbook template!
Check out the Formula Handbook template!