COUNTIFS for multiple ranges
I am trying to use COUNTIFS to add the values in multiple ranges for items that have a value of PASS. So far I can only pull the value in 1 range and i get "unparseable" if I try to add the values together---any ideas?
=("PASS " + "[" + (COUNTIFS(Status12:Status16, "PASS")) + "]")---this works only for 1 range of values
Best Answers
-
Nicely done. You mentioned something about "cleanliness"... I only have two suggestions for that.
First, you don't need all of the extra parenthesis around each section. Removing the unnecessary ones will help clean it up a touch.
Second, you can combine some of your text strings.
"PASS " + "[" + COUNTIFS()
vs
"PASS [" + COUNTIFS()
or
COUNTIFS() + "]" + " FAIL " + "[" + COUNTIF()
vs
COUNTIFS() + "] FAIL [" + COUNTIFS()
Here is what it would look like after those two things were "cleaned up":
="PASS [" + COUNTIFS(Status12:Status23, "PASS") + "] FAIL [" + COUNTIF(Status12:Status23, "FAIL") + "] INCOMPLETE [" + COUNTIF(Status12:Status23, "NOT STARTED") + "]"
-
Hi Paul,
Thanks for the tip!!! I had a really hard time figuring where to pull out the 'extra' parenthesis to avoid the dreaded 'unparseable' error.
Thank you!!
Answers
-
Can you share a screenshot of the data (without exposing any confidential information)? It might be helpful to see what you're talking about here.
-
Hey Mike,
I think I just answered my own question. I am trying to count the status of test cases (PASS, FAIL, INCOMPLETE). I was using COUNTIF instead of COUNTIFS.
This may not have been the cleanest way, but it seemed to do the trick by ignoring blank values in between multiple ranges:
=("PASS " + "[" + COUNTIFS(Status12:Status23, "PASS") + "]") + (" FAIL " + "[" + COUNTIF(Status12:Status23, "FAIL") + "]") + (" INCOMPLETE " + "[" + COUNTIF(Status12:Status23, "NOT STARTED") + "]")
-
Nice, glad you got that working for you! :)
-
Nicely done. You mentioned something about "cleanliness"... I only have two suggestions for that.
First, you don't need all of the extra parenthesis around each section. Removing the unnecessary ones will help clean it up a touch.
Second, you can combine some of your text strings.
"PASS " + "[" + COUNTIFS()
vs
"PASS [" + COUNTIFS()
or
COUNTIFS() + "]" + " FAIL " + "[" + COUNTIF()
vs
COUNTIFS() + "] FAIL [" + COUNTIFS()
Here is what it would look like after those two things were "cleaned up":
="PASS [" + COUNTIFS(Status12:Status23, "PASS") + "] FAIL [" + COUNTIF(Status12:Status23, "FAIL") + "] INCOMPLETE [" + COUNTIF(Status12:Status23, "NOT STARTED") + "]"
-
Hi Paul,
Thanks for the tip!!! I had a really hard time figuring where to pull out the 'extra' parenthesis to avoid the dreaded 'unparseable' error.
Thank you!!
-
Happy to help! 👍️
Those parenthesis can definitely be a bugger sometimes.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!