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
- 65.2K Get Help
- 445 Global Discussions
- 142 Industry Talk
- 473 Announcements
- 5K Ideas & Feature Requests
- 84 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!