EXCEL SOLUTIONS

COUNTIFS function in Excel

Counts the rows that meet several conditions at the same time.

IntermediateCounting

Syntax

=COUNTIFS(range1, criteria1, [range2, criteria2], ...)
Arguments of COUNTIFS
ArgumentWhat it means
range1, criteria1The first range and its condition.
range2, criteria2Optional. More pairs. A row is counted only if all conditions are true.

Examples with results

Every result below is calculated by the practice engine on the sample data shown, not typed in by hand.

Office supplies sales (fictional)

RowABCDE
1ItemQtyUnit priceRegionDate
2Pen101.5North2025-01-15
3Notebook512South2025-02-03
4Pen201.5South2025-02-28
5Stapler240North2025-03-10
6Folder153.25East2025-03-22
7Notebook812East2025-04-05
8Pen121.5North2025-04-18
9Marker302South2025-05-02
Office supplies sales (fictional) Row 1 holds the headings. All data is fictional. Dates are year-month-day.

Download CSV

  • =COUNTIFS(A2:A9,"Pen",D2:D9,"South")1

    Pen orders in the South

  • =COUNTIFS(B2:B9,">=10",D2:D9,"North")2

    Orders of 10 or more in the North

Try it yourself

Change the formula or switch to other sample data.

Press Calculate to see the result.

The practice box runs in your browser with BDK’s own calculator, which covers about 60 common functions. Cell references work as in Excel (B2, B2:B9). Your formulas are not saved or sent anywhere. For anything unusual, check the result in Excel itself.

How people use COUNTIFS at work

  • HR

    Sales team members rated 4 or higher.

    =COUNTIFS(B2:B8,"Sales",E2:E8,">=4")1
    Data: Team list (fictional)
  • Finance and accounting

    Invoices over 1000 for one customer.

    =COUNTIFS(B2:B6,"Harbour Cafe",C2:C6,">1000")1
    Data: Customer invoices (fictional)

Common mistakes and tips

  • All the ranges must be the same size.
  • Each condition needs its own range, even if it is the same range twice (for example, a date between two limits).

Works in

All versions of Excel, and Google Sheets.

Related formulas

COUNTIFSUMIFS

Lessons that use it

Need Something Different? Let’s Talk.

Looking for different features or something built around your workflow? Share your idea with us.