Help on NOT function within COUNTIF(S)!
Hi all,
I am trying to create a formula for a sheet summary. I have a "Chem" column that is populated from a form, and could be any one of 26 chem types. I want my summary to return the total number of chems within the Chem column, but I don't want it to include a specific chem, WOS, AND I don't want it to count blank cells.
I tried COUNTIFS function with NOT:
=COUNTIF(Chem:Chem, <>"")NOT(@cell = "WOS")
I almost tried a COUNTIFS and set my criteria as all those chemistries, but I would like to avoid having to type out all 26 kinds in a formula.
But I keep getting either an incorrect argument set or unparsable error every combination I try! And help or advice is well appreciated!!
Best Answer
-
Hey @nroth,
It looks like you have the brackets in the ranges entered incorrectly. When a column only has one word (like "Chem"), no brackets are required:
Chem:Chem
If the column name has spaces/special characters, then you use two sets of brackets:
[Chem test]:[Chem test]
If you fix that then it should work!
If my response was helpful in any way (or answered your question) please be sure to upvote it, mark it as awesome, or mark it as the accepted answer!
I'm always looking to connect with other industry professionals, feel free to connect with me on LinkedIn as well!
Answers
-
Hey @nroth,
It looks like how you're formatting the formula is incorrect. If you want to use a NOT with a COUNTIFS, then you'd do something like this:
=COUNTIFS(Chem:Chem, <>"", Range:Range, <>"WOS")
Hope this helps!
If my response was helpful in any way (or answered your question) please be sure to upvote it, mark it as awesome, or mark it as the accepted answer!
I'm always looking to connect with other industry professionals, feel free to connect with me on LinkedIn as well!
-
Hi @bisaacs !
Thanks for responding to quickly!! I tried that formula you gave me, and it is still giving me an unparsable error. This is the exact formula I put in:
=COUNTIFS([Chem:Chem], <>"", [Chem]:[Chem], <>"WOS")
Is it an issue having the same range in the formula for two different expressions? Not sure, but I added a screen shot of the sheet in case that helps!:
Highlighted is the Chem column in question, they populate from another sheet when conditions are met, hence why I don't want the formula to count blank cells! In this specific scenario, I want it to return "0" under Approved, since it is only the WOS on the sheet. Let me know your thoughts!!
-
Hey @nroth,
It looks like you have the brackets in the ranges entered incorrectly. When a column only has one word (like "Chem"), no brackets are required:
Chem:Chem
If the column name has spaces/special characters, then you use two sets of brackets:
[Chem test]:[Chem test]
If you fix that then it should work!
If my response was helpful in any way (or answered your question) please be sure to upvote it, mark it as awesome, or mark it as the accepted answer!
I'm always looking to connect with other industry professionals, feel free to connect with me on LinkedIn as well!
-
Oh wow, now I have lots of formulas to update and remove brackets from!! That worked though, thank you so much for all your help!! :)
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63K Get Help
- 380 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 450 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 289 Events
- 34 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!