This means we are working with scenario 2 above.
With COUNTIFS
You might at first reach for theCOUNTIFS function, which handles multiple criteria natively.
This works, but you might see this is a somewhat complicated and redundant formula.
(If you need a primer on Boolean algebra,this video provides an introduction.)
This is the count of rows where group = “a” ANDColor1ORColor2are “red”.
To avoid double counting
We don’t want to double count rows where bothColor1andColor2are “red”.