What Most People Miss About How to Use COUNTIFS Function in Excel

It's 4:47 PM on Friday. Your manager just asked for a consolidated headcount report by 5:00 — broken down by department, hire date range, and active status. You have three HR sheets open: Staff_Q1_2024.xlsx, Contractors.xlsx, and Terminations_Log.xlsx. You try COUNTIF on the first sheet — works fine for 'Sales' — but when you add the second condition ('Hire Date > 2024-01-01'), Excel returns zero. You check the dates. Format looks right. You retype the formula. Still zero. You glance at the clock. 4:51.

Quick Answer

COUNTIFS counts cells that meet multiple criteria across multiple ranges — but only if each criterion is applied to its own range, ranges are same size, and text criteria are wrapped in quotes while dates and numbers aren’t. The most common mistake? Using =COUNTIFS(A2:A100,"Sales",B2:B100,">1/1/2024") when B2:B100 contains Excel serial numbers (e.g., 45321), not text — so you must use >DATE(2024,1,1) or >45292.

All the Methods

MethodStepsBest ForLimitations
Basic COUNTIFS with two criteriaType =COUNTIFS(range1,criteria1,range2,criteria2)Counting staff in one dept hired after a dateAll ranges must be identical height/width; no array logic without Ctrl+Shift+Enter
COUNTIFS with wildcards (*, ?)Use "*Sales*" or "A?" inside quotesPartial text matches (e.g., "VP of Sales", "Sales Intern")Case-insensitive only; no regex; * matches any number of chars
COUNTIFS with dates using DATE()=COUNTIFS(B2:B100,">="&DATE(2024,3,1),B2:B100,"<="&DATE(2024,6,30))Quarterly reporting where dates change monthlyDATE() recalculates every time — can slow large sheets
COUNTIFS with cell references as criteria=COUNTIFS(A2:A100,D1,B2:B100,">="&E1)Dynamic dashboards where users change filters in D1/E1If E1 is blank, ">="&E1 becomes ">=", which counts all non-blanks — often unintended
COUNTIFS across sheets=COUNTIFS('Q1 Staff'!A2:A100,"Sales",'Q1 Staff'!C2:C100,">0")Consolidating from same-structure sheetsSheet names with spaces require single quotes; broken links if sheet renamed
COUNTIFS + SUMPRODUCT for OR logic=SUMPRODUCT((A2:A100="Sales")+(A2:A100="Marketing"),--(B2:B100>45292))Counting people in Sales OR Marketing hired after Jan 1Not native COUNTIFS — more complex, slower on 100k+ rows

Method 1 Deep Dive

Let’s fix that Friday 4:47 problem. Here’s your actual data in Sheet1:

A (Dept)B (Hire Date)C (Status)
Sales45321Active
Engineering45352Active
Sales45292On Leave
Marketing45383Active
Sales45412Active
Finance45261Terminated
Sales45305Active

Note: Column B contains Excel serial numbers (45321 = March 12, 2024). Don’t type ">1/1/2024". That forces Excel to treat it as text. Instead:

  1. Select cell E1 → type =COUNTIFS(A2:A8,"Sales",B2:B8,">="&DATE(2024,1,1),C2:C8,"Active")
  2. Press Enter. Result: 3 (rows 1, 5, 7)
  3. To avoid DATE(), paste this faster version in E2: =COUNTIFS(A2:A8,"Sales",B2:B8,">=45292",C2:C8,"Active")

The surprise? You can use raw serial numbers in criteria — and they’re faster than DATE(). Just make sure you know the number: =DATE(2024,1,1) returns 45292. Check with =B2 on any date cell to see its serial value.

Method 2 Deep Dive

Now imagine your manager says: “Give me headcount for anyone whose name starts with ‘S’ AND works in Sales OR Engineering.” Wildcards + OR logic — this is where most people give up and pivot to filters.

You’ll need two COUNTIFS formulas + addition — no nesting, no SUMPRODUCT unless you want volatility.

Assume your full list (A2:C12) includes names:

A (Name)B (Dept)C (Hire Date)
Sarah ChenSales45321
James WuEngineering45352
Stella ParkSales45292
Mark LeeMarketing45383
Sam RiveraEngineering45412
Tina ZhaoFinance45261
Simon GuptaSales45305

Formula in F1:

=COUNTIFS(A2:A8,"S*",B2:B8,"Sales") + COUNTIFS(A2:A8,"S*",B2:B8,"Engineering")

Returns 3: Sarah Chen, Stella Park, Sam Rivera.

Why not one COUNTIFS with {"Sales","Engineering"}? Because COUNTIFS doesn’t accept array constants in criteria — it treats them as a single string. You’ll get zero. Always split OR conditions into separate COUNTIFS calls and sum them.

Pro tip: Press Alt + = to auto-sum a range — but for COUNTIFS addition, type the first COUNTIFS, copy it (Ctrl+C), paste beside the + sign, then edit the dept reference. Saves 10 seconds per combo.

Cheat Sheet

StepActionResultShortcut
1Start formula with =COUNTIFS(Excel shows argument tooltipNone
2Select first range (e.g., A2:A100)Highlight appearsShift+Space selects current region
3Add first criterion in quotes if text ("Sales") or unquoted if number/date (>=45292)No #VALUE! errorF9 on selected date cell shows serial number
4Add second range/criterion pair — ranges must match size exactlyCorrect count, not #N/ACtrl+` (grave) toggles formula view
5For OR logic (Sales or Engineering), write two COUNTIFS + addAccurate multi-dept totalsAlt+= inserts SUM() — but here, type + and paste
6Test with =COUNTA(A2:A100) to verify row count matches your rangesCatches mismatched range heightsAlt+M+V opens Evaluate Formula
7Use "*text*" for partial matches, "?" for single char, "~*" to find literal asteriskFinds "VP of Sales" and "Sales Intern"Ctrl+H → ~* finds asterisks in data
Emily Watson

Emily Watson

Emily is an expert in workplace culture and team dynamics. Her articles help professionals navigate interpersonal challenges and build better coworker relationships.