Perform logical operations by using the COUNTIFS() function
=COUNTIFS($A$2:$A$7, E2, $B$2:$B$7, F2)Count the rows where the clinic matches E2 and the injury matches F2. Pairs of range and condition, and no range to total.
What the MO-211 task asks
COUNTIFS is the count with “both conditions must hold”: “count the Bayside patients still reporting a Pain Score of 6 or worse … Both conditions must hold”, or “count the weeks that took more than 6000 Admissions AND held an Avg Ticket of at least 8.8”.
Each condition is a range and a test. “6 or worse” on a pain score is >=6; “more than 6000” is >6000. The same column can appear twice, which is how you count values between two limits.
Our grader checks the value in every cell of the target range. It reads the values, not the function, so any formula that produces them earns the points — but one wrong cell fails the whole range.
Worked examples
Type these into a blank sheet to follow along. Every result below is what Excel showed.
| A | B | C | |
|---|---|---|---|
| 1 | Clinic | Injury | Pain |
| 2 | Central | Knee | 7 |
| 3 | Bayside | Back | 6 |
| 4 | Central | Back | 3 |
| 5 | Bayside | Knee | 8 |
| 6 | Central | Knee | 2 |
| 7 | Bayside | Knee | 5 |
| E | F | G | |
|---|---|---|---|
| 1 | Clinic | Injury | Patients |
| 2 | Bayside | Back | 1 |
| 3 | Central | Knee | 2 |
| 4 | Central | Hip | 0 |
=COUNTIFS(A2:A7, "Bayside", B2:B7, "Knee")Rows 5 and 7 are both Bayside and Knee.
=COUNTIFS(A2:A7, "Bayside", C2:C7, ">=6")Bayside patients with a pain score of 6 or worse: 6 and 8.
=COUNTIFS(C2:C7, ">=3", C2:C7, "<=6")The same column twice: pain scores from 3 to 6 — 6, 3 and 5.
=COUNTIFS($A$2:$A$7, E2, $B$2:$B$7, F2)Each row reads its clinic and injury from columns E and F. Nobody has a hip injury, so the count is 0. This is what the video below builds.
Watch it done in Excel
The last example above, recorded in real Excel on the same grid.
Exam traps
=COUNTIF(A2:A7, "Bayside")+COUNTIF(B2:B7, "Knee") returns 7: it counts the Bayside rows and the Knee rows separately. “Both must hold” is one COUNTIFS.
=COUNTIFS(A2:A7, "Bayside", C2:C7, ">6") returns 1, missing the patient on exactly 6.
Unlocked, the formula in G2 filled to G3 tests rows 3 to 8 and counts 1 Central Knee patient instead of 2: row 2 has slid out.
=COUNTIFS(A2:A7, "Bayside", B2:B6, "Knee") returns #VALUE!. Every range must cover the same rows.
FAQ
Can COUNTIFS count with OR?
Not in one condition. Add two: =COUNTIFS(B2:B7, "Knee")+COUNTIFS(B2:B7, "Back") returns 6.
Is the condition case-sensitive?
No. =COUNTIFS(A2:A7, "bayside", B2:B7, "knee") returns 2.
COUNTIFS with a single condition?
It works: =COUNTIFS(A2:A7, "Central") returns 3, the same as COUNTIF.
New to this function?
This page covers what the exam asks. For the full how-to — every argument, more examples and a practice workbook — read our guide on dfwexcel.com.
The COUNTIFS function, explained — dfwexcel.comTry it under exam conditions
Take a full, timed MO-211 practice exam, upload the workbook you built, and get a score out of 1000 with a per-task breakdown of where the points went. Your first one is free.
No credit card needed.
