How to count values if either of two conditions are true
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
-
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. -
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.
-
Simplifying the formula has worked as always. I asked the formula to sum two countif statements and it worked :D
Help Article Resources
Categories
Check out the Formula Handbook template!