Counting Opened Opened for a Particular Year
Hello,
I want to count the number of tickets that were opened in 2022. I am getting a invalid date type error message. The date range in the cross reference is restricted to dates only.
=COUNTIF({Date Requested}, YEAR(@cell) = 2022)
Answers
-
Hi @Mallory M.,
YEAR does not seem to play brilliantly with COUNTIF(s), so here's an alternative which should work:
=COUNTIFS({Date requested}, >=DATE(2022, 1, 1), {Date requested}, <=DATE(2022, 12, 31))
Hope this helps, but if you've any problems/questions then just post!
-
If you have blanks and/or non-date values in the date range, it will throw that error from the YEAR function. Try this:
=COUNTIF({Date Requested}, IFERROR(YEAR(@cell), 0) = 2022)
-
@Paul Newcome - That worked thank you so much! If I wanted to change the year to the current year how would I notate that? I tried the following and it did not work - Year@cell),0)=Today())
-
=COUNTIF({Date Requested},Β IFERROR(YEAR(@cell), 0)Β = YEAR(TODAY())) would do the current year.
-
@Nick Korna Thank you!!
Help Article Resources
Categories
Check out the Formula Handbook template!