I'm trying to add an "OR" value to a single column range in a COUNTIFS formula...
I have a formula that counts a row that's marked as "done" for me (by status = full), AND is equal to column "Media Type" (Value "Press Release"), AND marked finished in the last 30 days.
This is working now:
=COUNTIFS(Status:Status, ="Full", [Media Type]:[Media Type], ="Press Release", [Completion Date]:[Completion Date],
I'm trying to add the value "News Release on CHA.com" in the "Media Type" column to the total count in the formula.
So basically: "Count If media type is either Press Release or News Release on CHA.com, and marked completed in the last 30 days.)
I'm stuck here:
=COUNTIFS(Status:Status, ="Full", [Media Type]:[Media Type], ="Press Release", OR [Media Type:[Media Type] ="News Release on CHA.com", [Completion Date]:[Completion Date],
I'm not figuring this one out... Any help is appreciated!
Best Answer
-
Try this:
=COUNTIFS(Status:Status, ="Full", [Media Type]:[Media Type], OR(@cell = "Press Release", @cell = "News Release on CHA.com"), [Completion Date]:[Completion Date],
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
-
Try this:
=COUNTIFS(Status:Status, ="Full", [Media Type]:[Media Type], OR(@cell = "Press Release", @cell = "News Release on CHA.com"), [Completion Date]:[Completion Date],
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!
-
It looks like the end of your formula was chopped off in your question (it is a problem with the quote formatting in the community). I think it should be
=COUNTIFS(Status:Status, ="Full", [Media Type]:[Media Type], ="Press Release", [Completion Date]:[Completion Date], >TODAY(-30))
So now, your question. Assuming you also need the News releases to have the full status, the quickest thing is to repeat the above but for the new Media Type. Ie:
=COUNTIFS(Status:Status, ="Full", [Media Type]:[Media Type], ="News Release on CHA.com", [Completion Date]:[Completion Date], >TODAY(-30))
This gives you the count for the News Releases that are Full and Completed in the last 30 days.
And then just add the two numbers together with a plus sign
=COUNTIFS(Status:Status, ="Full", [Media Type]:[Media Type], ="Press Release", [Completion Date]:[Completion Date], >TODAY(-30)) + COUNTIFS(Status:Status, ="Full", [Media Type]:[Media Type], ="News Release on CHA.com", [Completion Date]:[Completion Date], >TODAY(-30))
Would that work for you?
-
@Paul Newcome 's answer is more elegant than mine :)
Here it is with the missing part, in case you need that:
=COUNTIFS(Status:Status, ="Full", [Media Type]:[Media Type], OR(@cell = "Press Release", @cell = "News Release on CHA.com"), [Completion Date]:[Completion Date], >TODAY(-30))
-
Thanks all, and yes the final version of my formula with the "in the last 30 days" part is this:
=COUNTIFS(Status:Status, ="Full", [Media Type]:[Media Type], OR(@cell = "Press Release", @cell = "News Release on CHA.com"), [Completion Date]:[Completion Date],
Thanks all for your help!
-
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
- 62.9K Get Help
- 379 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
- 302 Events
- 33 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!