Tabellab
Excel formulas

COUNTIFS with multiple criteria in Excel

COUNTIFS counts the rows that meet every condition you give it, as pairs of range and criterion: =COUNTIFS(E2:E11,"Open",D2:D11,"High") counts tickets that are open and high priority. In the example below that is 2 of 10 tickets. Criteria can be text, numbers with operators such as "<=24", dates built with DATE(), wildcards like "*refund*" or a cell reference. This guide answers nine typical questions on one ticket list, from a date range (7 tickets in March) to OR logic (5 by phone or chat).

Updated 30 Oct 2026 5 min read By Tabellab team

The syntax

=COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2], …). You can add up to 127 range/criterion pairs. A row is counted only if it meets all of them, so COUNTIFS always combines its conditions with AND. All ranges must have the same number of rows and columns; if one range is longer, COUNTIFS returns #VALUE!.

Text criteria are not case-sensitive: "open", "Open" and "OPEN" count the same rows. Comparison operators go inside the quotes together with the value: ">=2", "<>Closed". Without an operator COUNTIFS tests for equality.

Step by step: two criteria, then a range

For "open tickets with high priority", COUNTIFS checks the first pair (E2:E11 = "Open") row by row, then the second pair (D2:D11 = "High"). Rows 4, 6, 8 and 10 are open, but only rows 4 and 6 are also High, so the result is 2.

A range on one column needs two criteria on the same range. "First reply between 2 and 10 hours" is =COUNTIFS(F2:F11,">=2",F2:F11,"<=10"): the values 5, 2, 3, 4 and 9 qualify, so the count is 5. The same pattern counts a date range: =COUNTIFS(A2:A11,">="&DATE(2026,3,1),A2:A11,"<"&DATE(2026,4,1)) returns 7 tickets for March. Using "less than the first day of the next month" instead of "less than or equal to 31 March" keeps tickets with a time stamp on the last day.

Criteria from cells and calculations

A criterion can be a plain cell reference, =COUNTIFS(D2:D11,F21,E2:E11,"Open"), which makes the count interactive: type Medium in F21 and the result is 1, type High and it becomes 2. When the criterion needs an operator, join the operator in quotes and the cell or calculation with &: ">"&AVERAGE(F2:F11) counts tickets slower than the average first reply of 10 hours, which gives 3. Writing ">AVERAGE(F2:F11)" inside the quotes does not work, because COUNTIFS then compares with that literal text.

Worked example: counting support tickets with COUNTIFS

Ten support tickets (yellow). Each count below answers one question; F21 is a criteria cell you can change.

Worked example: counting support tickets with COUNTIFS
ABCDEF
1DateChannelTopicPriorityStatusFirst reply (h)
224 Feb 2026EmailRefund requestHighClosed5
327 Feb 2026PhoneLogin issueMediumClosed1
402 Mar 2026ChatRefund statusHighOpen2
505 Mar 2026EmailInvoice copyLowClosed26
609 Mar 2026EmailRefund requestHighOpen31
712 Mar 2026PhoneDelivery delayHighClosed3
818 Mar 2026ChatLogin issueMediumOpen1
923 Mar 2026EmailDelivery delayMediumClosed18
1030 Mar 2026PhoneRefund requestLowOpen4
1102 Apr 2026EmailAddress changeMediumClosed9
12
13QuestionCount
14Open tickets with High priority2
15Email tickets answered within 24 hours3
16Tickets created in March 20267
17Tickets about refunds (wildcard)4
18Phone or Chat (OR with an array constant)5
19First reply between 2 and 10 hours5
20Not closed (not equal to)4
21Priority to count (criteria cell)Medium
22Open tickets with the priority in F211
23Slower than the average first reply3
24Share of March tickets still open57.1%
Key formulas
  • F14=COUNTIFS(E2:E11,"Open",D2:D11,"High")Two text criteria (AND)
  • F16=COUNTIFS(A2:A11,">="&DATE(2026,3,1),A2:A11,"<"&DATE(2026,4,1))Date range: two criteria on the same column
  • F17=COUNTIFS(C2:C11,"*refund*")Contains "refund", any case
  • F18=SUM(COUNTIFS(B2:B11,{"Phone","Chat"}))OR: one count per value, then SUM
  • F22=COUNTIFS(D2:D11,F21,E2:E11,"Open")Criterion taken from a cell
  • F23=COUNTIFS(F2:F11,">"&AVERAGE(F2:F11))Operator joined to a calculated value
  • F24=COUNTIFS(A2:A11,">="&DATE(2026,3,1),A2:A11,"<"&DATE(2026,4,1),E2:E11,"Open")/F16Three criteria divided by the month count

Fictitious tickets. Dates are real Excel dates; COUNTIFS compares their serial numbers, so the date format does not matter.

Wildcards, blanks and "not equal"

An asterisk stands for any number of characters, a question mark for exactly one. "*refund*" counts every topic that contains "refund" anywhere, here 4. "Refund*" would only count topics that start with it. To count a real asterisk or question mark, put a tilde in front: "~*".

"<>Closed" counts everything that is not Closed, which includes blank cells in the range. "<>" on its own counts non-blank cells and "" counts blank cells. Combine them, for example =COUNTIFS(E2:E11,"<>Closed",E2:E11,"<>"), when empty rows at the end of a list should not be counted as open.

OR logic: one condition or another

Because COUNTIFS only knows AND, an OR question needs one count per value. =COUNTIFS(B2:B11,"Phone")+COUNTIFS(B2:B11,"Chat") works, and so does the shorter array constant =SUM(COUNTIFS(B2:B11,{"Phone","Chat"})): COUNTIFS returns {3,2}, SUM adds them to 5. This only works when the values are mutually exclusive in one column. For OR across two different columns, for example "Phone or High priority", adding two counts would count the rows that are both twice; subtract the overlap or use SUMPRODUCT.

Two lists of alternatives in two different columns can be combined in one formula if one array constant is written with commas (a row) and the other with semicolons (a column): =SUM(COUNTIFS(B2:B11,{"Phone","Chat"},D2:D11,{"High";"Medium"})) counts all four combinations of channel and priority, which gives 4 in the example: one ticket each for Phone/High, Phone/Medium, Chat/High and Chat/Medium. With commas in both constants Excel would pair the values position by position and only count Phone/High and Chat/Medium.

COUNTIF, COUNTIFS, SUMIFS or a PivotTable?

COUNTIF takes exactly one condition and COUNTIFS any number, so COUNTIFS with one pair can replace COUNTIF everywhere. When you need a total instead of a count, SUMIFS uses the same criteria rules with a sum range in front, and dividing a COUNTIFS by another count gives a share, like the 57.1% of March tickets that are still open. A PivotTable is faster for exploring, while COUNTIFS keeps the logic visible in cells and updates instantly when the data changes.

Common mistakes

  • Ranges of different size. COUNTIFS(E2:E11,"Open",D2:D12,"High") returns #VALUE!. Every criteria range needs the same shape.
  • Operator outside the quotes. COUNTIFS(F2:F11,>=2) is not a valid formula; write ">=2", or ">="&H1 when the value is in a cell.
  • Cell reference inside the quotes. ">H1" compares with the text H1. Join it: ">"&H1.
  • Expecting OR from extra pairs. Adding a second pair on the same column, such as Phone and Chat, always returns 0, because no cell is both. Use SUM with an array constant.
  • Dates typed as text. A date criterion like ">=01.03.2026" depends on regional settings. Build it with DATE(2026,3,1).
  • Long ID numbers. COUNTIFS treats numeric-looking text as numbers, so IDs with more than 15 digits that differ only at the end can be counted as equal. Use SUMPRODUCT with an exact comparison for such keys.

Frequently asked questions

How do I use COUNTIFS with multiple criteria?

Add one range and one criterion per condition, for example =COUNTIFS(E2:E11,"Open",D2:D11,"High"). COUNTIFS counts only the rows that meet all conditions.

How do I count between two dates with COUNTIFS?

Use the date column twice: =COUNTIFS(A2:A11,">="&DATE(2026,3,1),A2:A11,"<"&DATE(2026,4,1)). The second criterion uses the first day of the next month so that times on the last day are still counted.

Can COUNTIFS use OR logic?

Not directly, because all criteria are combined with AND. Add separate counts, or use =SUM(COUNTIFS(B2:B11,{"Phone","Chat"})) for several values in one column.

Why does my COUNTIFS return 0?

Common causes are extra spaces in the data, numbers or dates stored as text, an operator or cell reference written wrongly inside the quotes, or two conditions on the same column that can never both be true.

What is the difference between COUNTIF and COUNTIFS?

COUNTIF accepts one range and one criterion. COUNTIFS accepts up to 127 range and criterion pairs and counts the rows that meet all of them.

Practise it in a lab

Related guides

Reading is step one. Doing is step two.

Every guide links to a lab where you build the same calculation in an online spreadsheet and get instant feedback.

Open the lab