Syntax, a live playground, a measured multi-condition gallery, the AND-not-OR trap, and a sourced error library: conditional counts across many criteria.
Counts the rows that meet every criteria pair. There is no sum_range — it counts matches, not values.
COUNTIFS counts rows that meet every condition. It counts rows, not values — a matching row adds 1 no matter what is in it. Every row was measured live in HyperFormula. Click any row to load it.
| Expression | Result | Why |
|---|---|---|
| =COUNTIFS(A2:A5,"Apple",D2:D5,"East") | 2 | Apple AND East |
| =COUNTIFS(A2:A5,"Apple") | 2 | One pair behaves like COUNTIF |
| =COUNTIFS(A2:A5,"Apple",B2:B5,">120") | 1 | Apple AND amount>120 |
| =COUNTIFS(D2:D5,"East",C2:C5,">=15") | 1 | East AND qty>=15 |
| =COUNTIFS(B2:B5,">100",B2:B5,"<300") | 2 | Same range twice = a between test |
| =COUNTIFS(A2:A5,"*an*",D2:D5,"West") | 1 | Wildcard AND region |
| =COUNTIFS(A2:A5,"Apple",D2:D5,"West") | 0 | No match: 0 |
| =COUNTIFS(A2:A5,"<>Apple",D2:D5,"East") | 0 | Not-Apple AND East: none |
| Expression | Result | Why |
|---|---|---|
| =COUNTIFS(B2:B5,">100",B2:B5,"<300") | 2 | The same range can appear in two pairs |
Edit the table or type any formula — the engine evaluates instantly. Load a preset to see COUNTIFS AND criteria across columns, build a between-test, and return 0 when nothing matches.
8 failure patterns mined from actual user reports on Reddit, Stack Overflow and Super User — each with the authentic symptom, root cause, a fix, and a runnable formula. Not textbook theory.
COUNTIFS is available across modern Excel, Google Sheets and LibreOffice. It has been in Excel since 2007.
| Platform | Support | Notes | Gotcha |
|---|
COUNTIFS is one piece. The full course walks the toolkit end to end with live, measured examples.