How to Use COUNTIF and COUNTIFS in Excel
Read this guide in: English · मराठी · हिंदी
COUNTIF counts rows that match one condition. COUNTIFS counts rows that match several conditions.
Chala mitrano! Total rupaye nahi — “kitne orders?” hava aahe. COUNTIF counts. Why? Staffing and stock questions need row counts. How? Same shop sheet as SUMIF. Stay with me.
Quick answer
Vertical steps:
- Use City / Channel columns.
=COUNTIF(CityRange,"Mumbai")→ how many Mumbai rows.=COUNTIFS(CityRange,"Mumbai",ChannelRange,"Online")→ both rules.- Compare with AutoFilter count.
- Try
">=100"on Amount for high-value line count. - Keep every criteria range the same height.
=COUNTIF(A2:A4,"Mumbai")
=COUNTIFS(A2:A4,"Mumbai",B2:B4,"Online")
Language: English · मराठी · हिंदी
Before and after (look at the tables first)
Before — three orders
| City | Channel | Amount |
|---|---|---|
| Mumbai | Online | 100 |
| Mumbai | Store | 50 |
| Pune | Online | 40 |
After — COUNTIF Mumbai → 2 (not 150 rupees — two rows)
| Metric | Result |
|---|---|
| COUNTIF Mumbai | 2 |
| COUNTIFS Mumbai+Online | 1 |
Before
आधी (Before)
पहले (Before)
After
नंतर (After)
बाद में (After)
Why COUNTIF / COUNTIFS?
- SUMIF answers “how much money”.
- COUNTIF answers “how many lines / orders / customers”.
- Both appear in interviews side by side.
What happens
- COUNTIF Mumbai → rows 1 and 2 → 2.
- COUNTIFS Mumbai + Online → only row 1 → 1.
- COUNTIF Amount
">=100"→ only 100 → 1.
Vertical practice steps
- Recreate the three-row table.
- COUNTIF City Mumbai → 2.
- COUNTIF City Pune → 1.
- COUNTIFS Mumbai Online → 1.
- AutoFilter City = Mumbai; confirm 2 visible rows.
- Add a fourth Mumbai Online row; recount → 3 and 2.
COUNTIF vs SUMIF
| Need | Function |
|---|---|
| How many matching rows | COUNTIF / COUNTIFS |
| Total of Amount for matches | SUMIF / SUMIFS |
Ravindra Bagale's Tip
Students stare at COUNTIF and expect rupees. Count = rows. Sum = money. Write that on a sticky note for week one. Simple — powerful.
Practice task
- Ten rows of shop sales (mix cities).
- COUNTIF each city.
- COUNTIFS city + channel.
- One COUNTIF on Amount
">=100".
Samajla ka? COUNTIF counts rows with one rule; COUNTIFS with many. Not the same as summing money. Aata pudhe INDEX+MATCH.
Frequently asked questions
COUNTIF vs COUNTIFS?
COUNTIF = one condition. COUNTIFS = several conditions (AND logic).
Does COUNTIF sum money?
No. It counts rows. Use SUMIF when you need rupee totals.
Count blanks?
COUNTBLANK for empty cells, or COUNTIF(range,"") in some cases.
Wildcards?
Yes. COUNTIF(A:A,"Mum*") can count cities starting with Mum — use carefully.
Zero when you expect a number?
Check spelling, trailing spaces, and that ranges align.
Course lesson?
Chapter 3 — COUNT family including COUNTIF and COUNTIFS.