1Add COUNTIFs on the same column
=COUNTIF(A2:A13,"Open")+COUNTIF(A2:A13,"Pending")
- Write one COUNTIF per value you want to include.
- Add them together. This is safe when one cell cannot match both values.
Count rows that meet one condition or another with COUNTIF added together, an array constant, or SUMPRODUCT, without double counting.
COUNTIFS combines its conditions with AND: a row must meet all of them. To count rows that meet this or that, you need a different pattern.
When both tests look at the same column, add two COUNTIFs:
=COUNTIF(A2:A13, "Open") + COUNTIF(A2:A13, "Pending")
No row can be both Open and Pending, so nothing is counted twice. A tidier form uses an array constant: =SUM(COUNTIF(A2:A13, {"Open","Pending"})). COUNTIF runs once for each item in the braces and SUM adds the results.
When the tests look at different columns, adding two COUNTIFs can double count. A row in the North region with High priority would be counted once for each test. Count the rows once with SUMPRODUCT:
=SUMPRODUCT(--((B2:B13="North") + (C2:C13="High") > 0))
Each test gives TRUE or FALSE per row. Adding them gives 0, 1 or 2, the > 0 turns that into TRUE for rows meeting at least one test, and the double negative converts TRUE and FALSE to 1 and 0 so SUMPRODUCT can add them.
You can also remove the overlap: count both tests, then subtract the rows that met both with COUNTIFS. =COUNTIF(B,"North")+COUNTIF(C,"High")-COUNTIFS(B,"North",C,"High").
Remember the pitfall: always ask whether any row can meet both tests. If it can, adding is wrong. The Analysis track covers conditional counting with COUNTIFS and SUMPRODUCT.
=COUNTIF(A2:A13,"Open")+COUNTIF(A2:A13,"Pending")
=SUM(COUNTIF(A2:A13,{"Open","Pending"}))
=SUMPRODUCT(--((B2:B13="North")+(C2:C13="High")>0))
Solve it in the sheet. Every answer is checked, with hints if you need them.
Task 1 of 2
In E2, count the rows whose status in A2:A13 is Open or Pending.
Answer in E2.
Logic and text covers this in lesson 18, VALUE and text numbers.