Ravindra BagaleCourses & study guides Track your progress

Excel COUNTIF Function

Chala mitrano — today COUNTIF. One condition tally — how many Open tickets, how many Kolhapur rows.

Fictional sample data for learning. City and status tallies in Vijayawada ops and Seattle support queues. Mixed ₹ and $.

Purpose

Count cells that meet one condition.

Return value

How many cells match the criteria.

Syntax

COUNTIF(range, criteria)

Arguments

ArgumentRequired?Description
rangeRequiredRange to test.
criteriaRequiredCondition such as "Open" or ">50".

Version

All Excel versions. LibreOffice Calc and Google Sheets too.

How to use — Why → What → How

Why: Dashboards need headcounts by status or city. COUNTIF is the one-filter counter. City and status tallies in Vijayawada ops and Seattle support queues. Mixed ₹ and $. In Indian back offices and foreign sister teams, COUNTIF shows up on scoreboards, QC sheets and queue dashboards every week.

What: COUNTIF tests each cell in range against criteria and returns the match count. Read every argument in the table once before you type; each one changes the answer on purpose.

How — numbered steps:

  1. Type =COUNTIF(A2:A100,"Open").
  2. Use ">100" for numbers.
  3. Wildcards * and ? work on text.

Ravindra Bagale's Tip

Friends, after COUNTIF, find one column or range in a real workbook this week where this lesson saves time.

Ravindra Bagale's Tip

Friends, sleep on COUNTIF; rebuild example 1 tomorrow without looking.

Ravindra Bagale's Tip

Friends, say the business question in plain words before =COUNTIF.

Ravindra Bagale's Tip

Friends, check a known case with a calculator before you trust a long COUNTIF chain.

Ravindra Bagale's Tip

Friends, after you finish COUNTIF, open yesterday’s real workbook and find one place this function would have saved ten minutes.

Ravindra Bagale's Tip

Friends, treat COUNTIF like a seatbelt on status or city columns — check a known case first.

Download practice file: practice-countif.xlsx (includes sheet About this data, practice sheets, and Answers).

Worked examples

1) City count

Vijayawada.

City
Kolhapur
Austin
Kolhapur
Formula: =COUNTIF(A2:A4,"Kolhapur")

Result: 2

What it means: Two Kolhapur rows.

2) Status Open

Seattle queue.

Status
Open
Closed
Open
Formula: =COUNTIF(A2:A4,"Open")

Result: 2

What it means: Two open.

3) Tips >7

$ tips.

Tip $
5
8
12
Formula: =COUNTIF(A2:A4,">7")

Result: 2

What it means: Two tips above 7.

4) Wildcard

A* names.

Name
Asha
Ben
Ajay
Formula: =COUNTIF(A2:A4,"A*")

Result: 2

What it means: Asha + Ajay.

5) No match

Missing.

City
Pune
Formula: =COUNTIF(A2:A2,"Mumbai")

Result: 0

What it means: Zero — not an error.

6) Blank criteria

Empty cells.

Note
x
None
y
Formula: =COUNTIF(A2:A4,"")

Result: 1

What it means: One blank.

About this data. Small demo rows for learning. Real sheets are longer; the same formula pattern scales when columns are clean.

Common errors and fixes

0 not error — No matches returns 0. Fix: Expected — not #N/A.
Case — COUNTIF not case-sensitive. Fix: Use EXACT patterns if needed.
Wrong range — Counted adjacent column. Fix: Point criteria at the tested column.

Notes and tips

  • Revisit the COUNTIF errors table after the quiz.
  • Build example 1 from memory on a blank sheet.
  • Check number vs text if a result looks wrong.
  • Teach one tip in Marathi or Hindi this week.
  • Keep currency symbols consistent inside one report column (practice mixes ₹ $ £ €).
  • Drill: status tally on a four-row ticket sheet from memory.
  • COUNTIF vs SUMIF: count versus total with the same criteria style.
  • Fictional sample data only — names and amounts are for learning.
  • Print the COUNTIF revision card for one week of real worksheets.
  • Ask juniors to predict before they press Enter.
  • Track your top mistake with this function monthly.
  • City and status tallies in Vijayawada ops and Seattle support queues. Mixed ₹ and $.
  • Interview tip: explain the business question before the formula.
  • Classroom drill: invent three brand-new formulas from your city without the page open.
  • If a result looks wrong, check blanks vs zeros before rewriting.
  • When Excel versions differ, note the LibreOffice / Sheets fallback in a cell comment.
  • Prefer clear ranges over whole-column refs on huge sheets if speed matters.
  • Document units (₹, kg, days) in the header so totals stay honest.
  • Print the revision card for COUNTIF for one week of real worksheets.
  • When helping a junior, ask them to predict before Enter.
  • Share one tip with a classmate in Marathi or Hindi.
  • Keep currency symbols consistent inside a single report column.
  • Interview tip: explain the business question before the formula.
  • If a result looks wrong, check blanks vs zeros before rewriting maths.
  • When Excel versions differ, write a LibreOffice fallback under a comment.

In real work

Drill: status tally on a four-row ticket sheet from memory. City and status tallies in Vijayawada ops and Seattle support queues. Mixed ₹ and $. Classroom drill: write three brand-new COUNTIF formulas on a blank sheet using names from your own city — if you can invent them without the page open, you own the skill. Then break one formula on purpose and watch the error; recovering from that break is half of interview readiness. Always verify with a known case before trusting a long chain. Keep a personal notebook of the one mistake you make most often with this function; review it monthly.

How it compares

COUNTIF vs SUMIF: count versus total with the same criteria style.

Interview corner

COUNTIF vs COUNTIFS?
One vs many conditions.
No match?
0.
Wildcards?
* and ? on text.

COUNTIFS, SUMIF, AVERAGEIF, COUNT

Practice tasks (10)

  1. Task 1. Count how many rows in the City column equal Kolhapur.
    =COUNTIF on the City range with criteria "Kolhapur".
  2. Task 2. Count how many tickets in the Status column are still Open.
    =COUNTIF(StatusRange,"Open").
  3. Task 3. Count tip amounts greater than 7 in the Tip column.
    Use ">7" as the criteria on the Tip column.
  4. Task 4. Count City names that start with A (wildcard A*).
    =COUNTIF(CityRange,"A*").
  5. Task 5. Confirm a City that does not appear returns 0, not an error.
    COUNTIF returns 0 when nothing matches.
  6. Task 6. In one sentence, when would you use COUNTIFS instead of COUNTIF?
    Talk: two or more conditions (City and Status together).
  7. Task 7. Teach a junior: explain range vs criteria using Status "Open".
    Range = Status column; criteria = Open in quotes.
  8. Task 8. Count blank cells in the Status column.
    =COUNTIF(StatusRange,"") counts blanks.
  9. Task 9. Build a Status tally (Open / Closed / Pending) with three COUNTIF formulas.
    Lock the Status range with $ if you fill sideways.
  10. Task 10. Write one plain-English business question above your COUNTIF cell.
    Example: "How many Kolhapur orders are still open?"

Quick quiz

Q1. No matches?
Q2. Two filters?
Q3. A* matches Asha?
Q4. COUNTIF case-sensitive?
Q5. >7 on 5,8,12?

Answers: Q1=0, Q2=COUNTIFS, Q3=Yes, Q4=No, Q5=2 (check after you try).

Revision card

Standalone card (no tip or photo strip). QR opens this lesson. Download the PNG and revise offline.

Revision card: COUNTIF
COUNTIF revision card