Help w/COUNTIFS and multiple NOT(CONTAINS) functions
Hi team - I created a formula to count the number of numbers of errors in a specific month and does NOT CONTAIN "general counsel" in the Division Requested By column, the June example works:
June example formula:
=COUNTIFS([Main row]:[Main row], 1, Created:Created, IFERROR(MONTH(@cell), 0) = 6, [Incorrect format]:[Incorrect format], 1, [Division requested by]:[Division requested by], NOT(CONTAINS("general counsel", @cell)))
I now need to add another NOT(CONTAINS) formula to not count "Low" items in the IRR column but I can't seem to get the formula right. I'm using:
=COUNTIFS([Main row]:[Main row], 1, Created:Created, IFERROR(MONTH(@cell), 0) = 7, [Incorrect format]:[Incorrect format], 1, [Division requested by]:[Division requested by], NOT(CONTAINS("general counsel", @cell), IRR:IRR, NOT(CONTAINS("low", @cell))))
What am I missing?
Best Answer
-
It is just a misplaced parenthesis. You closed out your first CONTAINS, but didn't close out the NOT associated with it.
=COUNTIFS([Main row]:[Main row], 1, Created:Created, IFERROR(MONTH(@cell), 0) = 7, [Incorrect format]:[Incorrect format], 1, [Division requested by]:[Division requested by], NOT(CONTAINS("general counsel", @cell)), IRR:IRR, NOT(CONTAINS("low", @cell)))
Adding in that closing parenthesis (in bold) and removing one from the end should clear up the issue for you.
Answers
-
Hi @lewis hamilton - unfortunately I have too many criteria in the IRR column and it's "easier" to figure out what NOT to count vs including every possible option of the items that need to be counted. In my case, I have a 2 NOT(CONTAINS) to use for 2 different columns.
-
It is just a misplaced parenthesis. You closed out your first CONTAINS, but didn't close out the NOT associated with it.
=COUNTIFS([Main row]:[Main row], 1, Created:Created, IFERROR(MONTH(@cell), 0) = 7, [Incorrect format]:[Incorrect format], 1, [Division requested by]:[Division requested by], NOT(CONTAINS("general counsel", @cell)), IRR:IRR, NOT(CONTAINS("low", @cell)))
Adding in that closing parenthesis (in bold) and removing one from the end should clear up the issue for you.
-
@lewis hamilton Smartsheet does not have a SUMPRODUCT function built in.
-
@Paul Newcome - doh, the dreaded missing parenthesis!!!!! That did the trick - thanks so much!!!
-
Happy to help. 👍️
And yes. Those parenthesis can be a pain. I also have problems with forgetting square brackets sometimes too. Those aren't too bad in Smartsheet because you don't get all of the colors and end up with an error, but here in the Community I tend to forget them sometimes. Haha.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 494 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!