How to create a countif formula with OR
I am trying to create a formula across columns with different values in a cell. I have the formula for one value, Preliminary Draft. This works fine.
=COUNTIFS({Comments Log Range 1}, [Document Name]@row, {Comments Log Range 2}, "Preliminary Draft", {Comments Log Range 4}, "Open")
However, the value in range 2 can also be "Intermediate", or "Final".
This is what I tried:
=COUNTIFS(({Comments Log Range 1}, [Document Name]@row), OR({Comments Log Range 2}, "Intermediate", {Comments Log Range 2}, "Preliminary Draft", {Comments Log Range 2}, "Final"), {Comments Log Range 4}, "Open"))
Smartsheet says its UNPARSEABLE.
I am sure it's a simple solution, but I can't figure it out. Thanks.
Answers
-
Try this one.
=COUNTIFS(({Comments Log Range 1}, [Document Name]@row), OR({Comments Log Range 2} = "Intermediate", {Comments Log Range 2} = "Preliminary Draft", {Comments Log Range 2} = "Final"), {Comments Log Range 4} = "Open"))
-
Still returns as unparseable
-
My apologies, I didn't notice your last condition was not inside the OR(). Try this one
=COUNTIFS({Comments Log Range 1}, [Document Name]@row, OR({Comments Log Range 2} = "Intermediate", {Comments Log Range 2} = "Preliminary Draft", {Comments Log Range 2} = "Final"), {Comments Log Range 4}, "Open")
-
Now the error is 'invalid operation'.
-
=COUNTIFS({Comments Log Range 1}, [Document Name]@row, {Comments Log Range 2}, OR(@cell = "Intermediate", @cell = "Preliminary Draft", @cell = "Final"), {Comments Log Range 4}, "Open")
-
Hi,
Thanks for the suggestion, @Carson Penticuff . However, I was unable to make the @cell work. Did it work for anyone else?
Thanks for any suggestions.
-
I have it working here:
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives