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
- 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!