I'm trying to add an "OR" value to a single column range in a COUNTIFS formula...

Options

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

Answers

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Answer ✓
    Options

    Try this:

    =COUNTIFS(Status:Status, ="Full", [Media Type]:[Media Type], OR(@cell = "Press Release", @cell = "News Release on CHA.com"), [Completion Date]:[Completion Date],


  • KPH
    KPH ✭✭✭✭✭✭
    edited 10/31/23
    Options

    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?

  • KPH
    KPH ✭✭✭✭✭✭
    Options

    @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))

  • Justin Cascade
    Options

    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!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!