Skip to content
GridBelt
  • Excel Test
  • Practice
  • Programs
  • Pricing
Sign in
Start the free test
  • Excel Test
  • Practice
  • Programs
  • Pricing
Sign inCreate account
Start the free test
GridBelt

Practice Excel in your browser.

Excel Test

  • Level 1: Beginner
  • Level 2: Intermediate
  • Level 3: Expert
  • Excel test in 7 days
  • Leaderboard
  • Excel test for interview
  • Indeed Excel assessment

Practice

  • All exercises
  • Programs
  • For beginners

Guides

  • Excel formulas
  • Excel shortcuts

Company

  • About
  • Pricing
  • How we grade

© GridBelt. All rights reserved.

  • Privacy Policy
  • Terms of Use
  • Refund Policy

Excel is a trademark of Microsoft Corporation. Indeed, TestGorilla, SHL and other marks are the property of their owners. GridBelt is an independent practice site and is not affiliated with, endorsed by or sponsored by Microsoft, TestGorilla, SHL or Indeed.

  1. Practice
  2. /
  3. COUNTIF and COUNTIFS

COUNTIFS practice: orders per region and month from 300 rows

  • Intermediate
  • ~7 min
  • COUNTIF and COUNTIFS

The sales operations team pulled 300 orders from July to October 2026. The export carries the order date, a Month column (Jul, Aug, Sep, Oct) and the region (North, South, West). Management wants a month-by-region order count — the kind of table a pivot would give — as live formulas, so it refreshes with the export. The grid is laid out in F1:J4: regions down column F, months across row 1. Fill it with one formula.

What you need to do

  1. 1Click G2. This cell must count the orders whose region is the label in F2 (North) and whose month is the label in G1 (Jul).
  2. 2Write COUNTIFS as pairs of range, criterion: the Region column D2:D301 against F2, then the Month column C2:C301 against G1.
  3. 3Lock the references for copying: both data ranges fully ($D$2:$D$301, $C$2:$C$301), the region label by column only ($F2) and the month label by row only (G$1). F4 / ⌘T cycles through the $ variants.
  4. 4Press Enter, then fill G2 right to J2 with the fill handle, then select G2:J4 and press Ctrl+D / ⌘D to fill the row down to row 4. The twelve counts must add up to 300. Then click Check.

Answer cells

Feedback

Type your formula in the grid, press Enter, then Check. We grade the value in each answer cell and the formula behind it.

Tasks

  1. Not checkedFill G2:J4 with the number of orders per region (labels in F2:F4) and month (labels in G1:J1) using COUNTIFS over D2:D301 and C2:C301 — one formula with mixed references, copied across the whole grid.

Desktop recommended for spreadsheet tasks. The sheet scrolls inside this box.

StartInsertFormulasDataView
A1fxPreparing your workbook…
A
B
C
D
E
F
G
H
I
J
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Sheet1

Enter your formula in the sheet, then check.

About this exercise

A 300-row dataset on one sheet, one answer cell, about 7 minutes. Graded in your browser: the value and the formula behind it, with feedback that names the fix.

How to solve it

  • G2=COUNTIFS($D$2:$D$301,$F2,$C$2:$C$301,G$1)

COUNTIFS counts the rows where every range/criterion pair is satisfied at the same time: region equals the row label and month equals the column label. The mixed references do the rest: $F2 always reads the region in column F of the cell's own row, G$1 always reads the month in row 1 of the cell's own column, and the data ranges are fully locked. One formula therefore fills all twelve cells, and the counts add up to the 300 orders because every order has exactly one region and one month.

Pitfall 1: locking the wrong half (F$2 and $G1) makes the first row and column look right and everything else wrong — check the bottom-right cell's formula after filling. Pitfall 2: the Month column must match the header text exactly ("Jul", not "July" or "07"); when the export has only dates, add two date conditions per month (">="&first day, "<="&last day) or a helper column =TEXT(B2,"mmm"). Pitfall 3: COUNTIF (singular) takes one pair only; typing COUNTIF with two pairs returns a #VALUE! or counts the wrong thing. Alternatives: SUMPRODUCT(($D$2:$D$301=$F2)*($C$2:$C$301=G$1)) is the array form and also works in very old versions; a pivot table gives the same grid in four clicks but does not refresh automatically with a pasted export unless you refresh it. In Excel 365, =COUNTIFS($D$2:$D$301,F2:F4,$C$2:$C$301,G1:J1) in G2 spills the whole 3 × 4 grid from one cell.

Other ways that work

  • =SUMPRODUCT(($D$2:$D$301=$F2)*($C$2:$C$301=G$1)) — array form, same mixed references
  • =COUNTIFS($C$2:$C$301,G$1,$D$2:$D$301,$F2) — the pairs in the other order
  • =COUNTIFS($D$2:$D$301,F2:F4,$C$2:$C$301,G1:J1) in G2 — Excel 365 only; one spilling formula for the grid

Common mistakes

Filling =COUNTIFS($D$2:$D$301,F2,$C$2:$C$301,G1) across without the mixed $: in H2 the labels slide to G2 (an answer cell) and H1, so the second column onwards counts the wrong things or returns 0.

How we grade

Any formula that produces the right result is accepted, unless the task names a function: then another function earns half credit. We compare values with a small tolerance and ignore case and spaces in text. A correct number typed by hand instead of a formula earns half credit. Multi-cell tasks earn full credit at 100% of cells, half credit from 50%. Where it matters, we also change an input cell on a copy of your sheet and check that your formula follows.

Answers computed with Excel 365 rules and checked in our grading engine on November 16, 2026. Author: GridBelt team.

In these programs

  • Excel test in 7 days, Level 2 planDay 3
  • Learn Excel From ScratchDay 11

Related exercises

  • Orders per status with COUNTIFBeginner, ~5 min
  • Orders between two datesIntermediate, ~6 min
  • Sales by region and product with SUMIFSIntermediate, ~7 min

Function reference

Official documentation

Next exercise

Orders between two dates