Statistical FunctionsIntermediate

Count a Month's Repair Requests with COUNTIFS and a Date Window

"How many came in last month?" is a count between two dates. COUNTIFS can test the same column twice, once for on-or-after the first day and once for on-or-before the last, and then keep narrowing with any other condition you add.

Task:

You run the maintenance desk at a lettings agency, and the landlords' monthly report is due. A2:D11 is the repairs log: the job number, the date the tenant reported it, the trade it needs and its status. The log runs over the end of each month, so it includes a few jobs from October and December. G1 and G2 hold the first and last day of the month you are reporting on. In G3, count the repairs reported in that month. In G4, count how many of those are still Awaiting a contractor. In G5, count how many of those awaiting jobs are Plumbing. All three answers should update if someone changes the dates in G1 and G2.

Interactive Spreadsheet

Hints

+5 XPno-hints bonus

Solve it on your own to keep the bonus. Each hint gets one step closer to the formula.

The data in this exercise

This is the grid you start with. Cell references in the task — B6, C2 — point at the row numbers and column letters below.

11 rows × 7 columns3 cells you fill in
ABCDEFG
1JobReportedTradeStatusFrom11/1/2026
2R-220110/29/2026PlumbingDoneTo11/30/2026
3R-220410/31/2026ElectricalAwaitingReported
4R-220711/1/2026PlumbingAwaitingStill awaiting
5R-221211/6/2026RoofingBookedPlumbing awaiting
6R-221511/12/2026PlumbingDone
7R-221911/18/2026ElectricalAwaiting
8R-222311/24/2026PlumbingAwaiting
9R-222611/30/2026HeatingAwaiting
10R-223012/1/2026PlumbingAwaiting
11R-223312/2/2026ElectricalBooked
What this exercise teachesMay contain the answer

A month's count is a range of dates, and a range needs two tests: on or after the first day, and on or before the last. COUNTIFS counts only the rows that pass every pair it is given, so B2:B11,">="&G1 and B2:B11,"<="&G2 together keep exactly the November rows, even though both pairs test the same column. That gives 6 in G3. The edges are why the operators matter: R-2207, reported on 11/1/2026, and R-2226, reported on 11/30/2026, sit exactly on the boundaries, and writing > and < instead of >= and <= quietly drops both, leaving 4 and a report that undercounts the month. The dates have to be joined on with & because COUNTIFS reads every criterion as text, the way COUNTIF does: ">="&G1 hands it >= followed by the date in G1, while ">=G1" asks for dates on or after the word G1, matches nothing and returns 0. G4 keeps both date pairs and adds D2:D11,"Awaiting", which gives 4. Counting Awaiting across the whole log would say 6, because R-2204 from October and R-2230 from December are still waiting too; they belong in the backlog, but not in November's figures. G5 adds one more pair, C2:C11,"Plumbing", and only R-2207 and R-2223 pass all four tests, so it returns 2. Because the window lives in G1 and G2 rather than inside the formulas, next month's report is two typed dates, not three edited formulas.