Using multiple conditions from multiple columns for CountIF
Hi, I'm trying to use conditional logic to count how many rows meet the following conditions. But I seem to missing something...
=COUNTIF(([Approval Status]:[Approval Status], OR(@cell = "Approved", @cell = "Exception Approved")), +([Promo]:[Promo], OR(@cell = "Value 1", @cell ="Value 2", @cell = "Value 3")))
I've also tried this:
=COUNTIF(([Approval Status]:[Approval Status], OR(@cell = "Approved", @cell = "Exception Approved")), AND([Promo]:[Promo], OR(@cell = "Value 1", @cell ="Value 2", @cell = "Value 3")))
I also tried
=COUNTIFS(([Approval Status]:[Approval Status], OR(@cell = "Approved", @cell = "Exception Approved")), +([Promo]:[Promo], OR(@cell = "Value 1", @cell ="Value 2", @cell = "Value 3")))
=COUNTIFS(([Approval Status]:[Approval Status], OR(@cell = "Approved", @cell = "Exception Approved")), AND([Promo]:[Promo], OR(@cell = "Value 1", @cell ="Value 2", @cell = "Value 3")))
Best Answer
-
Based on your updated post with the COUNTIFS, your second COUNTIFS would be the closest but you have too many parenthesis tucked in and you do not need the AND statement. Try just following the syntax outlined in the article. There are a few examples underneath the "Usage Notes" section that show the proper syntax.
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Answers
-
You need a COUNTIFS (with the "S" on the end) to include multiple range/criteria sets.
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
Thanks Paul, I tried that and it also didn't work. I think there must be a syntax issue...
-
Based on your updated post with the COUNTIFS, your second COUNTIFS would be the closest but you have too many parenthesis tucked in and you do not need the AND statement. Try just following the syntax outlined in the article. There are a few examples underneath the "Usage Notes" section that show the proper syntax.
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
Thanks Paul, here is the updated syntax and it works! Thank you!
=COUNTIFS([Approval Status]:[Approval Status], OR(@cell = "Approved", @cell = "Exception Approved"), [Promo]:[Promo], OR(@cell = "Value 1", @cell = "Value 1", @cell = "Value 1"))
-
Happy to help. 👍️
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
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!