COUNTIFS nested formula help

I'm trying to get a count for multiple solutions but am getting the '#NESTED CRITERIA' error.

=COUNTIFS({Rapid Response Delivery Tracking Range 6}, CONTAINS("Meal Replacement", @cell) + COUNTIFS({Rapid Response Delivery Tracking Range 6}, CONTAINS("Meal Replacement - 2nd Solution", @cell)))


Essentially I need it to give me a total count for both 'Meal Replacement' and 'Meal Replacement - 2nd Solution' - what am I missing?

Answers

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    To add two COUNTIFS together, you need to close each out on it's own.

    =COUNTIFS(........) + COUNTIFS(............)


    Or you can use an OR statement to combine two sets of criteria for the same range.

    =COUNTIFS({Rapid Response Delivery Tracking Range 6}, OR(CONTAINS("Meal Replacement", @cell), CONTAINS("Meal Replacement - 2nd Solution", @cell))

  • Jan Peters
    Jan Peters ✭✭✭✭

    Thanks Paul - is there something that I should be using other than 'CONTAINS' - I ultimately want a formula that will find 'Meal Replacement' and COUNT it whether it's "Meal Replacement" or "Meal Replacement - 2nd Solution" - I am not confident that the CONTAINS sub-string is working as I need it to? Would 'FIND' and COUNT make more sense?

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    The above should work just fine. I use CONTAINS functions A LOT.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!