Home › Excel functions › COUNTIFS
COUNTIFS in Excel: Count with Multiple Criteria
COUNTIFS counts the rows that meet all of your conditions: orders that are shipped and above $100, tickets opened this month and still open. It's the multi-condition version of COUNTIF.
In this guide
COUNTIFS syntax
=COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2], …)Pairs of a range and a condition. All ranges must be the same size; a row is counted only when every condition is true for that row.
Basic example
| A | B | C | |
|---|---|---|---|
| 1 | Date | Region | Sales |
| 2 | Jan 8, 2026 | North | 1,200 |
| 3 | Jan 15, 2026 | South | 800 |
| 4 | Feb 3, 2026 | North | 950 |
| 5 | Feb 20, 2026 | East | 450 |
| 6 | Mar 2, 2026 | South | 700 |
Two rows are North, but only one has sales of 1,000 or more, so the result is 1.
COUNTIFS practice: try it yourself
Reading is one thing, typing it is another. Build the formula below step by step: the tips tell you what to type next, and you can click or drag across cells to add them, just like in Excel.
Task: Count the Paid invoices from the North region, in D2: =COUNTIFS(A2:A8,"North",B2:B8,"Paid")
Count between two dates
=COUNTIFS(A2:A6, ">="&DATE(2026,2,1), A2:A6, "<="&DATE(2026,2,28))Returns 2: the two February entries. With dates in cells: ">="&F1 and "<="&F2.
More criteria
- Not equal:
=COUNTIFS(B2:B6, "<>North")returns 3. - Wildcards:
"*urgent*"counts cells containing "urgent". See wildcards. - Not empty:
"<>"; empty:"". - Overdue and not done:
=COUNTIFS(D2:D100, "<"&TODAY(), E2:E100, "<>Done")
OR conditions
COUNTIFS uses AND logic. For OR, add separate counts:
Comparison operators: what to type
| Type | Means |
|---|---|
| = | is equal to |
| > | greater than |
| < | less than |
| >= | greater than or equal to: first >, then = |
| <= | less than or equal to: first <, then = |
| <> | not equal to: first <, then > |
Always two separate keys, never a special symbol. In criteria, put the operator and the value together inside quotes, such as ">=500" or "<>Paid" as the condition.
Returns 3. Or shorter: =SUM(COUNTIFS(B2:B6, {"North","East"})). Make sure the OR options can't both be true for the same row, or it gets counted twice.
Count numbers between two values
To count values within a range, use the same column twice: once with the lower limit and once with the upper limit.
=COUNTIFS(C2:C6, ">=700", C2:C6, "<=1000")Returns 3: 800, 950 and 700. With the limits in F1 and F2, write =COUNTIFS(C2:C6, ">="&F1, C2:C6, "<="&F2). Use > and < if the limits themselves shouldn't count: then 700 drops out and the result is 2.
Count by month or year
COUNTIFS needs a real range as its criteria range, so Excel won't accept =COUNTIFS(MONTH(A2:A6), 1). Count from the first day of the month up to the first day of the next month instead. With Jan 1, 2026 in F1:
Returns 2: the two January rows. EDATE(F1, 1) gives Feb 1, 2026, and < leaves that date itself out, so you never need to know how many days a month has. For a whole year, use DATE(2026,1,1) and DATE(2027,1,1). Other conditions work as usual: add B2:B6, "North" and January gives 1.
Rather work with the month number? SUMPRODUCT does accept MONTH: =SUMPRODUCT((MONTH(A2:A6)=1)*(B2:B6="North")) also returns 1, but counts January of every year.
Common mistakes
- #VALUE!: ranges of different sizes.
- Too low: numbers or dates stored as text, or extra spaces in the data (use TRIM).
- Operator with a cell doesn't work: write
">"&F1, not">F1".
In practice: open, urgent tickets per team
A help desk wants to know how many tickets are still open with high priority, per team. That is three conditions at once, which is exactly what COUNTIFS is for.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Ticket | Team | Priority | Status |
| 2 | T-1 | Sales | High | Open |
| 3 | T-2 | Support | Low | Open |
| 4 | T-3 | Sales | High | Closed |
| 5 | T-4 | Sales | High | Open |
| 6 | T-5 | Support | High | Open |
| 7 | T-6 | Sales | Low | Open |
=COUNTIFS(B2:B7, "Sales", C2:C7, "High", D2:D7, "Open")
The answer is 2: T-1 and T-4. T-3 is Sales and High too, but already closed. Put the team name in a cell (say G2) and use G2 instead of the text, and you can copy the formula down for every team.
More COUNTIFS examples
Copy a formula and change the ranges to match your own data.
| What you want | Formula |
|---|---|
| Count rows that match E1 in column A and F1 in column B | =COUNTIFS(A2:A100, E1, B2:B100, F1) |
| Count dates between the dates in E1 and F1 | =COUNTIFS(C2:C100, ">="&E1, C2:C100, "<="&F1) |
| Count rows for E1 where column B is filled in | =COUNTIFS(A2:A100, E1, B2:B100, "<>") |
| OR: count rows with E1 or E2 | =COUNTIFS(A2:A100, E1)+COUNTIFS(A2:A100, E2) |
Keep learning
Frequently asked questions
What's the difference between COUNTIF and COUNTIFS?
COUNTIF handles one condition; COUNTIFS handles one or more. COUNTIFS with a single condition works exactly like COUNTIF.
Is COUNTIFS case-sensitive?
No. "north" and "North" are treated the same.
How many criteria can COUNTIFS have?
Up to 127 range/criteria pairs.
How do I count unique values with multiple criteria?
COUNTIFS counts every matching row, duplicates included. In Microsoft 365 or Excel 2021 and later, =ROWS(UNIQUE(FILTER(B2:B6, C2:C6>=700))) returns 2: only North and South have sales of 700 or more. More ways in counting unique values.
How do I exclude several values?
Add a "not equal" condition for each value, on the same range: =COUNTIFS(B2:B6, "<>North", B2:B6, "<>South") returns 1, the East row.
Can COUNTIFS count data on another sheet?
Yes. Put the sheet name before each range, for example =COUNTIFS(Data!B2:B100, "North", Data!C2:C100, ">=1000"). All criteria ranges must still have the same number of rows.