How to Use COUNTIF in Excel

Count cells that match text, number, date or multiple criteria using COUNTIF and COUNTIFS in Excel.

Excel & Google SheetsUpdated 2026-08-08Edited by Pramod TiwariReviewed by Pramod TiwariMicrosoft Excel; verified 8 August 2026
2 min read

Quick Answer

Use =COUNTIF(range, criteria) for one condition and =COUNTIFS(criteria_range1, criteria1, ...) for multiple conditions. Put text and direct operators in quotation marks, keep COUNTIFS ranges the same size and test the formula against visible sample rows.

What You Need

  • Data range
  • A clearly defined condition
  • Excel worksheet

Safety Precautions

  • Check hidden spaces and inconsistent data types.
  • Validate counts before using them in reports.

Step-by-Step Instructions

  1. Step 1

    Define what should count

    Write the condition in plain language first.

  2. Step 2

    Choose COUNTIF or COUNTIFS

    Use one function for one condition and the plural form for several.

  3. Step 3

    Select the criteria range

    Choose the cells Excel should evaluate.

  4. Step 4

    Enter the criterion

    Use a value, text, wildcard or referenced cell.

  5. Step 5

    Add more criteria if needed

    Keep every criteria range aligned.

  6. Step 6

    Check sample rows

    Manually count a small filtered set to verify the formula.

Practical Example

=COUNTIFS($B$2:$B$100,"Paid",$C$2:$C$100,">30") counts paid records whose value exceeds 30.

Common Mistakes

  • Counting blanks unintentionally
  • Using mismatched COUNTIFS ranges
  • Forgetting quotation marks around operators

Troubleshooting

Text matches are missed

Remove hidden spaces or normalize inconsistent entries.

The count is too high

Check wildcard use, blanks and duplicate rows.

Sources and Review

Reviewed by Pramod Tiwari, Editor; official-source verification on 2026-08-08.

FAQs

Is COUNTIF case-sensitive?

COUNTIF is generally not case-sensitive.

Can it count partial text?

Yes, supported wildcards can match part of a text value.

When should I use COUNTIFS?

Use it when all specified conditions must be evaluated together.

Help us improve this guide

Tell us about an outdated instruction, unclear step, broken link or safety concern. Do not include passwords, account numbers, medical records or other sensitive information.

Email a correction or suggestion