CountIfs
I am trying to work with a countifs formula. I have a column titled "Event Date" Format MM/DD/YY and a column titled "Risk Level". Values in risk level are "low", "medium", "high".
I am trying to count the number of each risk level that occur each month/year.
I can get the count for each risk level ok, but adding the date has given me all sorts of errors.
Best Answers
-
I think to start you're looking for:
=COUNTIFS([Risk Level]:[Risk Level], "low", [Event Date]:[Event Date], MONTH(@cell)=1)
This should get you all of the low level risks for January. If you're looking to add a year you can add:
,[Event Date]:[Event Date], YEAR(@cell)=2020)
-
If you want to count year and month you can also use the actual date format.
=counitfs([Risk Level]:[Risk Level], "High", [Event Date]:[Event Date], AND(@cell>=Date(2020, 12 1),@cell<=DATE(2020, 12, 31)))
-
Alternatively, you can also use the new capabilities in reports -- Grouping (by month and risk -- you may have to add a column to your sheet for month based on event date) and Summarize (aka count of risk level)
Answers
-
I think to start you're looking for:
=COUNTIFS([Risk Level]:[Risk Level], "low", [Event Date]:[Event Date], MONTH(@cell)=1)
This should get you all of the low level risks for January. If you're looking to add a year you can add:
,[Event Date]:[Event Date], YEAR(@cell)=2020)
-
If you want to count year and month you can also use the actual date format.
=counitfs([Risk Level]:[Risk Level], "High", [Event Date]:[Event Date], AND(@cell>=Date(2020, 12 1),@cell<=DATE(2020, 12, 31)))
-
Alternatively, you can also use the new capabilities in reports -- Grouping (by month and risk -- you may have to add a column to your sheet for month based on event date) and Summarize (aka count of risk level)
-
Thank you all! Each of these worked in their own way!
-
Great, glad we could help you out. Please accept our answers! :D Happy Smartsheeting!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.2K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 476 Announcements
- 5K Ideas & Feature Requests
- 84 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!