# Help w/COUNTIFS and multiple NOT(CONTAINS) functions

Options
✭✭✭✭✭✭
edited 07/29/20

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?

• ✭✭✭✭✭✭
Options

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.

• ✭✭✭✭✭✭
Options

@lewis hamilton Smartsheet does not have a SUMPRODUCT function built in.

• ✭✭✭✭✭✭
Options

@Paul Newcome - doh, the dreaded missing parenthesis!!!!! That did the trick - thanks so much!!!

• ✭✭✭✭✭✭
Options

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

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!