How to Count Cells That Meet a Condition with COUNTIF in Excel

Counting how many survey responses said "yes," or how many students scored above a certain mark, gets old fast when you're doing it by hand. COUNTIF counts them for you instantly, based on a condition you set once.

  1. Click the cell where the count should appear

    Select an empty cell where you want the count of matching items to be displayed.

  2. Type the COUNTIF function

    Enter a formula in the form "=COUNTIF(range, criteria)".

  3. Select the range to check

    Drag to select the range of cells you want the condition checked against.

  4. Enter the condition

    Enter numeric conditions directly (like "A1>=60"), and wrap text conditions in quotation marks (like "Pass").

  5. Why this is worth using

    For counting how many items in a list meet a condition β€” how many survey respondents answered "yes," how many students scored 60 or above β€” COUNTIF gives you the number instantly instead of counting by hand.

A quick alternative to building a full pivot table

For a single quick tally β€” like how many rows match one condition β€” COUNTIF gets you the answer in one formula, without the overhead of setting up a full pivot table. It's the right tool when you just need a number, not a full breakdown.

Combining it with other functions

COUNTIF becomes even more useful nested inside other formulas β€” for example, wrapping it in an IF to flag whether a count has crossed a threshold. Getting comfortable with COUNTIF on its own is the first step toward combining it with functions like SUMIF or VLOOKUP for more complex reporting.

Frequently Asked Questions

How do I count cells that meet two or more conditions at once?

COUNTIF only supports a single condition. For two or more conditions, use COUNTIFS instead, in the form "=COUNTIFS(range1, criteria1, range2, criteria2)".

How do I count only cells that are not blank?

Use "=COUNTIF(range, "<>")" β€” entering "<>" (not equal to blank) as the condition counts only the cells that contain something.