Two countif statements in one formula?
Hello,
I am pretty new to Smartsheet, and I've created a metrics dashboard. If anyone can point me in the right direction, I'd appreciate it.
I am trying to use two different criterion to find a value for my dashboard. One of them is a title, such as "Medical Student".
I've used =COUNTIF({Reference Sheet}, "Medical Student"). That returns all Medical Students. I would like to find the Medical Students only from January. How do I get it to return only Medical Students that started in January of 2023? I have a date column to key on. Can you reference two different columns on the same sheet for two different criterion in the same formula?
I have used this formula on another sheet to pull numbers by month. I tried combining the first COUNTIF with this one using AND, but it doesn't work.
=COUNTIF({Reference Sheet}, AND(IFERROR(MONTH(@cell), 0) = 1, IFERROR(YEAR(@cell), 0) = 2023))
Thank you!
Best Answer
-
You have to use a COUNTIFS (with the "S" on the end) to allow for multiple range/criteria sets.
Answers
-
You have to use a COUNTIFS (with the "S" on the end) to allow for multiple range/criteria sets.
-
Thank you Paul! Now I see how to choose range, criterion, range, criterion in the same formula. I appreciate your help!
Shelley
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!