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!!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.1K Get Help
- 444 Global Discussions
- 142 Industry Talk
- 472 Announcements
- 5K Ideas & Feature Requests
- 83 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 489 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!