Count if "Compliant" and if Blank
I am looking for the correct formula to count if cells in a range are "compliant" and if they are blank. I have tried several ways with no success, including:
=COUNTIFS([Bandera Q1]114:[Bandera Q1]131, "Compliant" + COUNTIFS([Bandera Q1]114:[Bandera Q1]131, ""))
=COUNTIFS([Bandera Q1]114:[Bandera Q1]131, "Compliant", [Bandera Q1]114:[Bandera Q1]131, "")
Here is a screenshot. I only need to count if compliant or blank so that I can divide by the number of questions in that column to get a compliance %. This issue came about when we added new questions after the audit was completed, therefore, the cell will be blank.
Best Answer
-
I hope you're well and safe!
Try something like this.
=COUNTIF([Bandera Q1]114:[Bandera Q1]131, OR(@cell = "Compliant", @cell = "")) / [# of Questions]113
Did that work/help?
I hope that helps!
Be safe, and have a fantastic week!
Best,
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
✅Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up, Awesome, or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
Answers
-
Hello, @Courtney Collier ! You'll want to use ISBLANK.
=COUNTIF([Bandera Q1]114:[Bandera Q1]131, OR(@cell = "Compliant", @cell= ISBLANK(@cell))
I hope that helps!
Amber Eakin, MSLS, M.Ed.
Adult Education Specialist | Process Improvement Enthusiast
-
@Amber Eakin Thank you! That part is working. I then tried to divide by the number of questions by referencing row 113 in the top left-hand corner of the screenshot below (18). I received an invalid operation error. The "18" is a formula for count of children - giving the number of questions. Any thoughts?
-
@Courtney Collier Yep. You should have two parentheses after the final @cell. It should read like this.
=COUNTIF([Bandera Q1]114:[Bandera Q1]131, OR(@cell = "Compliant", @cell= ISBLANK(@cell)) / [# of Questions]113
Does that work?
Amber Eakin, MSLS, M.Ed.
Adult Education Specialist | Process Improvement Enthusiast
-
It does not. I did have two:
=COUNTIF([Bandera Q1]114:[Bandera Q1]131, OR(@cell = "Compliant", @cell = ISBLANK(@cell)) / [# of Questions]113
-
I hope you're well and safe!
Try something like this.
=COUNTIF([Bandera Q1]114:[Bandera Q1]131, OR(@cell = "Compliant", @cell = "")) / [# of Questions]113
Did that work/help?
I hope that helps!
Be safe, and have a fantastic week!
Best,
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
✅Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up, Awesome, or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
-
I've noticed that sometimes formulas get a little wonky if they're pulling a number that's from another formula. Try this out.
=COUNTIF([Bandera Q1]114:[Bandera Q1]131, OR(@cell = "Compliant", @cell = ISBLANK(@cell)) / COUNT(CHILDREN(Section/Question1))
If the cell reference isn't 1, then you'll need to change that reference.
Amber Eakin, MSLS, M.Ed.
Adult Education Specialist | Process Improvement Enthusiast
-
@Amber Eakin @Andrée Starå Thank you both! Both options worked :)
-
Excellent!
You're more than welcome!
✅Please support the Community by marking the post(s) that helped or answered your question or solved your problem with the accepted answer/helpful, Insightful/Vote Up/Awesome. It will make it easier for others to find a solution or help to answer!
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
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!