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
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 66.7K Get Help
- 436 Global Discussions
- 152 Industry Talk
- 497 Announcements
- 5.3K Ideas & Feature Requests
- 85 Brandfolder
- 155 Just for fun
- 77 Community Job Board
- 508 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 308 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!