COUNTIFS for year within criteria
I am pretty new to using formulas. I'm working on a dashboard for one of my sheets and I want to show how many escalations a plant has had this year alone. Here is what I have so far:
=COUNTIFS(([Plant]:[Plant], "Changzhou"), IFERROR(YEAR(@cell), 0) = 2019)
I've tried many different variations based on my scouring of this community but I keep getting #unparseable error. Can anyone help me get it right? Thanks!
Comments
-
https://help.smartsheet.com/function/countifs
COUNTIFS(range1,criterion1,range2,criterion2
The main thing I notice is that your second part of your countifs statement doesn't have a range. You aren't telling it where to look for the date. Once you have determined what formula you want to use, if you aren't sure how to properly utilize the formula, the official smartsheet documentation is a much faster way to learn how to implement than the community.
=countifs([Plant]:[Plant], "Changzhou",Date:Date,Year(@cell)=2019)
-
I got it! Thanks for your help! My first copy/paste didn't work. I had to make some tweaks. Here is what it was in the end:
=COUNTIFS(Plant:Plant, "Changzhou", [Date of Issue]:[Date of Issue], YEAR(@cell) = 2019)
-
Not a problem. If you want to not have to edit the formula each year by having it update itself every year, you can do something like this
=COUNTIFS(Plant:Plant, "Changzhou", [Date of Issue]:[Date of Issue], YEAR(@cell) = year(today())
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!