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],
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],
-
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. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!