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
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 495 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives