Excel COUNTIFS

COUNTIFS counts the rows where every condition you give it is true. It needs no column of numbers to add.

A support lead needs to know how many tickets are still open, how many belong to one team, and how many urgent tickets have waited more than a day. Those counts decide who gets help this afternoon. COUNTIFS answers each one from the raw ticket export in a single cell.

Practice it now

How to write it

=COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2], ...)
criteria_range1
The first column to test.
criteria1
What that column must match.
criteria_range2, criteria2
Optional extra tests. A row is counted only if it passes them all.

Watch it work

F2fx 
ABCDEFG
1TeamPriorityStatusHours open
2BillingHighOpen5
3TechHighClosed12
4BillingLowClosed2
5TechHighOpen30
6SalesMediumOpen8
7TechLowOpen1
8
1

One pair works perfectly well, and leaves room to add more tests later.

Examples

How many tickets are open?

=COUNTIFS(C2:C7,"Open")4

One pair works perfectly well, and leaves room to add more tests later.

Open tickets for Tech

=COUNTIFS(A2:A7,"Tech",C2:C7,"Open")2

Tech has three tickets, but one of them is closed.

Urgent tickets waiting over 24 hours

=COUNTIFS(B2:B7,"High",C2:C7,"Open",D2:D7,">24")1

Three conditions narrow the list to the one ticket that needs action now.

Your turn

Count the High priority tickets handled by Tech. Type your formula in F2.

ABCDEF
1TeamPriorityStatusHours open
2BillingHighOpen5
3TechHighClosed12
4BillingLowClosed2
5TechHighOpen30
6SalesMediumOpen8
7TechLowOpen1
8

Common mistakes

Expecting OR logic from two pairs on one column.

Testing one column for both Open and Closed returns 0. Add two COUNTIFS instead.

Hidden spaces, such as "Open " in exported data.

Those rows quietly fail the match. Clean the column with TRIM first.

Good to know

  • Matching ignores upper and lower case, so OPEN and Open count together.
  • Use "*" as a wildcard: "Tech*" matches anything that starts with Tech.
  • COUNTIFS or COUNTIF? COUNTIF takes one condition. COUNTA counts every filled cell with no condition. COUNTIFS covers one or many conditions.