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
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.3K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 477 Announcements
- 5K Ideas & Feature Requests
- 85 Brandfolder
- 150 Just for fun
- 72 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 302 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!