Math & Trig
Count with OR criteria: same-column addition vs two-column overlap
Add COUNTIF calls for mutually exclusive values in one column, and subtract COUNTIFS overlap when testing OR across two columns.
Same-column OR vs cross-column OR double-counting
Within a single column, one cell cannot equal both "Overdue" and "Escalated" at the same time, so COUNTIF(A2:A6, "Overdue") + COUNTIF(A2:A6, "Escalated") gives the exact OR count.
Across two different columns—such as Status = "Overdue" OR Priority = "High"—adding two COUNTIF calls counts rows where BOTH conditions are true twice! Subtracting COUNTIFS(Status, "Overdue", Priority, "High") once applies inclusion-exclusion.
| Status (A) | Priority (B) | Overdue OR Escalated (Col A) | Overdue (A) OR High (B) |
|---|---|---|---|
| Overdue | High | Yes | Yes (both!) |
| Overdue | Normal | Yes | Yes |
| Open | High | No | Yes |
| Closed | Low | No | No |
| Escalated | Normal | Yes | No |
Two-column OR without double-counting
Status has 2 "Overdue" rows and Priority has 2 "High" rows, with row 2 matching both. Inclusion-exclusion yields 2 + 2 - 1 = 3 unique rows (whereas naive addition wrongly reports 4).
=COUNTIF(A2:A6, "Overdue") + COUNTIF(B2:B6, "High") - COUNTIFS(A2:A6, "Overdue", B2:B6, "High")Same-column OR formula
For mutually exclusive labels in Column A ("Overdue" or "Escalated"), simple addition returns 2 + 1 = 3.
=COUNTIF(A2:A6, "Overdue") + COUNTIF(A2:A6, "Escalated")Try the example
Use the original values or change them to test your understanding.