Templates, guides & honest tool reviews for small business

Sunday, November 29, 2026

COUNTIFS Function in Excel with Multiple Criteria: Dates, Blanks and OR

COUNTIFS function in Excel with multiple criteria
Illustration: COUNTIFS in Excel with multiple criteria

The COUNTIFS function in Excel with multiple criteria counts the rows that meet two or more rules at once. Use it to count orders that are open and over 100, or dates that fall between a start and an end. This guide gives you the formulas, with made-up data, and the mistakes to avoid.

COUNTIFS syntax in Excel: pairs of range and criteria
Each range comes with its own rule (illustration).

COUNTIFS syntax

COUNTIFS takes pairs of arguments: a range, then the rule for that range. Add as many pairs as you need. A row is counted only when it meets every rule.

=COUNTIFS(range1, rule1, range2, rule2)

COUNTIFS with two conditions in Excel: status Open and amount over 100
Made-up data (illustration).

COUNTIFS with two conditions: an example

Suppose column C holds the status and column D holds the amount. To count rows where the status is Open and the amount is over 100:

=COUNTIFS(C:C, "Open", D:D, ">100")

Text rules go in quotes. Number rules with a sign, such as ">100", also go in quotes.

COUNTIFS between two dates in Excel using start and end date cells
The date column appears twice (illustration).

COUNTIFS between two dates

With dates in column A, a start date in F1 and an end date in F2:

=COUNTIFS(A:A, ">="&F1, A:A, "<="&F2)

The same column appears twice, once for each end of the range. If you want to add values instead of counting, see our guide to SUMIFS between two dates.

COUNTIFS with not equal to and blank cells

  • Not equal to text: =COUNTIFS(C:C, "<>Cancelled")
  • Blank cells: =COUNTIFS(C:C, "")
  • Cells that are not blank: =COUNTIFS(C:C, "<>")

COUNTIFS with wildcards and OR logic

An asterisk matches any text. The formula =COUNTIFS(B:B, "*north*") counts cells that contain the word north.

COUNTIFS uses AND logic. For OR, add two COUNTIFS together. To count status Open or Pending:

=COUNTIFS(C:C, "Open") + COUNTIFS(C:C, "Pending")

COUNTIFS mistakes in Excel: different range sizes and dates stored as text
Common mistakes (illustration).

Common COUNTIFS mistakes

  • Ranges of different sizes. Every range must have the same number of rows.
  • Dates stored as text. The count comes back as zero. Convert them to real dates.
  • A sign outside the quotes. Write ">100" with the sign inside the quotes.
  • Extra spaces in the data. "Open " does not match "Open". Clean the data first.

COUNTIFS in Excel: common questions

What is the difference between COUNTIF and COUNTIFS?

COUNTIF takes one range and one rule. COUNTIFS takes many pairs.

Does COUNTIFS work in Google Sheets?

Yes, with the same arguments. For a Sheets guide to adding by rules, read our SUMIF with multiple criteria guide.

Can COUNTIFS be case sensitive?

No, COUNTIFS ignores case. Use a different method if the case matters.

Related guides on Sheets AI Hub

See the pivot table tutorial for counting without formulas, and Excel automation tips.

العربية