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
- Smartsheet Customer Resources
- 62.1K Get Help
- 348 Global Discussions
- 199 Industry Talk
- 427 Announcements
- 4.4K Ideas & Feature Requests
- 133 Brandfolder
- 127 Just for fun
- 127 Community Job Board
- 455 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 282 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!