How to count values if either of two conditions are true

Options

I have two sheets: Sheet A and Sheet B

I would like to count the number of cells in Sheet A, Column A and Sheet B, Column B that have the value "Liver".

Both sheets are stored under the same folder.

Answers

  • Toufong Vang
    Toufong Vang ✭✭✭✭✭
    Options

    Hi, @Arundhati , the formula below will achieve that.

    =COUNTIF({Sheet A Column A}, "Liver") + COUNTIF({Sheet B Column B}, "Liver")

    ...where {Sheet A Column A} and {Sheet B Column B} are cross-sheet references to the corresponding columns in each sheet.

  • Arundhati
    Arundhati ✭✭✭
    Options

    Thanks Toufong, maybe the formula needs a little more detail. That one is not returning results.


    Here is what I am trying: =COUNTIF(OR(CONTAINS("Liver", {SheetA Range1}), CONTAINS("Liver", {SheetB Range2})), "Liver")


    This formula is in a third sheet that is performing similar countif functions for other values.

  • Arundhati
    Arundhati ✭✭✭
    Options

    Simplifying the formula has worked as always. I asked the formula to sum two countif statements and it worked :D

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!