multiple NOT(CONTAINS) not working
Hello,
i hope someone can help me solve this puzzle. I'm calculating the number of rows in my sheet based on some criteria in one column (Division), but I need to exclude 3 people (rows) from it temporarily based on another column (Last Name).
I'm able to exclude one, but I'm not able to add the exclusions for the other two.
=COUNTIFS([Division]:[Division], OR(@cell = "Div 1", @cell = "Div 2", @cell = "Div 3", @cell = "Div 4", @cell = "Div 5"), [Last Name]:[Last Name], NOT(CONTAINS(@cell, "Person 1")))
this formula works and exclude Person 1, but I'm trying to add two more and i get INCORRRECT ARGUMENT.
I tried multiple ways (below is one of them).
=COUNTIFS([Division]:[Division], OR(@cell = "Div 1", @cell = "Div 2", @cell = "Div 3", @cell = "Div 4", @cell = "Div 5"), [Last Name]:[Last Name], NOT(CONTAINS(@cell, "Person 1", @cell, "Person 2")))
Thank you for your help!
Best Answer
-
Try: =COUNTIFS([Division]:[Division], OR(@cell = "Div 1", @cell = "Div 2", @cell = "Div 3", @cell = "Div 4", @cell = "Div 5"), [Last Name]:[Last Name], AND(NOT(CONTAINS("Person 1", @cell)), NOT(CONTAINS("Person 2", @cell))
Answers
-
Try: =COUNTIFS([Division]:[Division], OR(@cell = "Div 1", @cell = "Div 2", @cell = "Div 3", @cell = "Div 4", @cell = "Div 5"), [Last Name]:[Last Name], AND(NOT(CONTAINS("Person 1", @cell)), NOT(CONTAINS("Person 2", @cell))
-
thank you, @Nic Larsen it works great!
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
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 305 Events
- 34 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!