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
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!