SUMIFS in a finance Excel test: worked example and the trap
SUMIFS is the function finance Excel tests use most. Here is a typical question, the answer, and the mistake that makes a correct-looking total wrong.
In short: SUMIFS(sum_range, criteria_range1, criteria1, …) adds the numbers that meet every condition. In tests it is usually sales by region and period. The trap: SUMIFS silently skips numbers stored as text, so the total looks fine but is too low. In the example below it returns 7,640 when the right answer is 8,840.
The test question
Brief: "What were North's sales in Q2 2026?" The export looks like this:
| A: Date | B: Region | C: Product | D: Sales | |
|---|---|---|---|---|
| 2 | 28 Mar 2026 | North | Desk | 2,400 |
| 3 | 3 Apr 2026 | North | Chair | 1,150 |
| 4 | 11 Apr 2026 | South | Desk | 3,200 |
| 5 | 19 Apr 2026 | North | Desk | 2,750 |
| 6 | 2 May 2026 | North | Lamp | 1200 (stored as text) |
| 7 | 15 May 2026 | South | Chair | 980 |
| 8 | 8 Jun 2026 | North | Chair | 1,640 |
| 9 | 30 Jun 2026 | North | Desk | 2,100 |
| 10 | 1 Jul 2026 | North | Lamp | 900 |
Put the region in G1 (North), the first day of the quarter in G2 (1 Apr 2026) and the first day of the next quarter in G3 (1 Jul 2026).
The answer
=SUMIFS(D2:D10,B2:B10,G1,A2:A10,">="&G2,A2:A10,"<"&G3)
- The first range is what you add. After that come pairs: a range, then its condition.
- Every condition must be true for a row to count. SUMIFS is AND, never OR.
- For dates, use "on or after the first day" and "before the first day of the next period". Times on 30 June still count, and you never type 30 or 31.
- Conditions joined with
&must be in quotes:">="&G2, not>=G2.
Excel returns 7,640. The correct answer is 8,840.
The trap: numbers stored as text
Row 6 holds 1200 as text, which is common in exports. SUMIFS skips it with no error and no warning. The total is 1,200 short.
How to catch it in a test:
- Compare
=COUNT(D2:D10)with=COUNTA(D2:D10). Here they return 8 and 9. One "number" isn't a number. - Look for numbers sitting on the left of the cell, or a small green triangle.
- Fix it in a helper column with
=VALUE(D2), then sum that column. Don't retype the number, because the next export will have the same problem.
The same silent miss happens when a region is typed North with a trailing space. If you suspect that, clean the column with =TRIM(B2) first.
Two more conditions
Desks only, North, Q2: add one more pair, C2:C10,"Desk". The answer is 4,850. Partial text works with wildcards: "*Desk*" matches "Standing Desk".
For "North or South", SUMIFS can't do OR in one go. Add two SUMIFS together, or see SUMPRODUCT.
Questions people ask
What is the difference between SUMIF and SUMIFS?
SUMIF takes one condition and puts the sum range last. SUMIFS takes one or more conditions and puts the sum range first. Use SUMIFS everywhere so you only remember one order.
Why does my SUMIFS return 0?
Usually the condition never matches: a trailing space, a typo, a date stored as text, or a condition written as >=G2 instead of ">="&G2. Check one row by hand with a simple equals test, like =B2=G1.
Can SUMIFS use whole columns?
Yes. =SUMIFS(D:D,B:B,G1) picks up new rows automatically. All ranges must be the same size, so don't mix D:D with B2:B10.
Now try one that marks itself
The free check gives you an email, a messy export and 10 minutes. It re-runs your formulas on data you haven't seen and shows what broke.