Syntax
| Parameter | Description |
|---|---|
| range1 | Parameter of the COUNTIFS function. |
| criteria1 | Parameter of the COUNTIFS function. |
| ... | Parameter of the COUNTIFS function. |
Examples
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Region | Sales | Status | Date |
| 2 | East | 1200 | Shipped | 2024-01-15 |
| 3 | West | 800 | Pending | 2024-02-20 |
| 4 | East | 2100 | Shipped | 2024-03-05 |
| 5 | East | 450 | Cancelled | 2024-01-28 |
Count orders by region and status
=COUNTIFS(A2:A100, "East", C2:C100, "Shipped")
Count within a date range
=COUNTIFS(D2:D100, ">="&DATE(2024,1,1), D2:D100, "<"&DATE(2024,4,1))
Count values in a numeric range
=COUNTIFS(B2:B100, ">=80", B2:B100, "<=90")
Common Errors
The criteria ranges have different sizes. All ranges in COUNTIFS must have the same number of rows and columns.
No rows match ALL criteria simultaneously. Check each criterion individually with COUNTIF to see which one is too restrictive.
Tips
Use the same range twice for between: =COUNTIFS(B:B, ">=10", B:B, "<=20") counts values from 10 to 20.
For dynamic criteria: =COUNTIFS(A:A, F1, B:B, ">"&G1) uses cell values instead of hardcoded criteria.
COUNTIFS uses AND logic. For OR, add separate COUNTIFS: =COUNTIFS(A:A,"East",B:B,">100")+COUNTIFS(A:A,"West",B:B,">100").
Try COUNTIFS in Viztab
Import your data and use COUNTIFS with 370+ other formulas. No signup required.
Open Viztab