Counting rows with a checkbox
Hi I am trying to count the number of records that meet a certain criteria and has checked checkbox.
The formula I am trying is:
=COUNTIFS({Evaluation}, "1", {Resources}, CONTAINS("Scenario 2", @cell))
{Evaluation} is a column that uses check boxes
{Resources} is a column that uses dropdown selections
I want to count the number of times the evaluation checkbox is checked and Resources contains the phrase "Scenario 2".
If I separate each of the statements I get the appropriate information but when I am trying to use COUNTIFS with more than one range and criteria I am getting the error message ##Incorrect Argument Set
Answers
-
Try taking the 1 out of quotations.
=COUNTIFS({Evaluation}, 1, {Resources}, CONTAINS("Scenario 2", @cell))
-
Still have the same issue
-
I would try the HAS formula
=COUNTIFS({Evaluation}, 1, {Resources},HAS(@cell, "Scenario 2"))
Another option is to break down your formula and test each COUNTIF individually first to see which one is erroring the return.
=COUNTIF({Evaluation}, 1)
=COUNTIF({Resources},HAS(@cell, "Scenario 2"))
Then you can rebuild it back to a COUNTIFS.
-
I can't use the HAS function because {Resources} has a lot of text so I am only looking if "Scenario 2" exists within the text.
When I break down into the two COUNTIF structures I get the correct results when I combine them into the COUNTIFS I am getting the error.
-
See the following post from 2019. Paul Newcome who is a great resource when it comes to formulas provides insight to issues he has seen when using the CONTAINS formula. Possibly this will help with the issue you are seeing.
https://community.smartsheet.com/discussion/64461/countifs-contains-function
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.3K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 477 Announcements
- 5K Ideas & Feature Requests
- 85 Brandfolder
- 151 Just for fun
- 72 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 302 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!