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
- 63.7K Get Help
- 406 Global Discussions
- 216 Industry Talk
- 456 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 297 Events
- 37 Webinars
- 7.3K Forum Archives