COUNTIF Function

rlakin52911
rlakin52911 ✭✭✭
edited 12/09/19 in Formulas and Functions

I'm trying to count everything in a Type column that = "Risk" that match a status of "Red" and "Yellow".

How would I add "Yellow" to this statement?

=COUNTIFS(Type:Type, "Risk", Status:Status, "Red")

Comments

  • J. Craig Williams
    J. Craig Williams ✭✭✭✭✭✭

    I think you mean OR, since (at least in my system) Status can't be both Red and Yellow at the same time.

    =COUNTIFS(Type:Type, "Risk", Status:Status, "Red") + COUNTIFS(Type:Type, "Risk", Status:Status, "Yellow")

    or

    =COUNTIFS(Type:Type, "Risk", Status:Status, OR(@cell ="Red", @cell ="Yellow")

    should work.

    Craig

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!