The end date is counted twice
Using <= with the next period’s first day includes a record that belongs to the next period.
Step-by-step guide · read-only ·
Loading your interactive spreadsheet…
Preparing the worksheet and formulas…
In G7, total amounts where region and status match G2:G3 and the date is at least G4 but before G5.
Follow the highlighted cells. Switch to Your turn to edit. Answer cell: G7. Browser calculations may differ from your Excel version.
Practice stays on this device. No worksheet data is uploaded.
Add paid sales for one region and date window, while keeping refunds and boundary dates in view.
Every row must match the region and payment status, start on or after G4, and fall before G5. The matching refund reduces the total to 430.
=SUMIFS(D2:D9,B2:B9,G2,C2:C9,G3,A2:A9,">="&G4,A2:A9,"<"&G5)This is the separate primary practice rule. Dates and amounts are numbers; the start is included and the end excluded. Choosing an exclusion example below does not change that practice.
=SUMIFS(D2:D9,B2:B9,G2,C2:C9,G3,A2:A9,">="&G4,A2:A9,"<"&G5)| Row | A | B | C | D | F | G |
|---|---|---|---|---|---|---|
| 1 | "Date serial" | "Region" | "Status" | "Amount" | "Condition" | "Value" |
| 2 | 46296 | "East" | "Paid" | 120 | "Region" | "East" |
| 3 | 46297 | "East" | "Pending" | 80 | "Status" | "Paid" |
| 4 | 46300 | "West" | "Paid" | 200 | "Start (inclusive)" | 46296 |
| 5 | 46301 | "East" | "Paid" | 250 | "End (exclusive)" | 46327 |
| 6 | 46310 | "East" | "Paid" | -30 | — | — |
| 7 | 46326 | "East" | "Paid" | 90 | "Matching total" | 430 |
| 8 | 46327 | "East" | "Paid" | 400 | — | — |
| 9 | 46295 | "East" | "Paid" | 500 | — | — |
These are reference examples with matching downloads. The primary worksheet has its own stated task and checks; choosing an example here leaves that worksheet and your progress unchanged.
Open the primary practiceMicrosoft function reference ↗ · Browser calculations checked. Native Excel and Google Sheets recalculation of these reference files has not been verified.
Each example uses the source data in its own downloadable workbook. Cell references below belong to that file. Opening an example leaves the primary practice and your progress unchanged.
Every row must match the region and payment status, start on or after G4, and fall before G5. The matching refund reduces the total to 430.
=SUMIFS(D2:D9,B2:B9,G2,C2:C9,G3,A2:A9,">="&G4,A2:A9,"<"&G5)Enter in G7 in this example's workbook. The download contains the complete source and all result formulas.
This is the separate primary practice rule. Dates and amounts are numbers; the start is included and the end excluded. Choosing an exclusion example below does not change that practice.
Download this example's workbookJoin the not-equal operator to G2. Every nonblank status except Pending contributes. Column C explains each row; column D retains matching refunds and zeroes.
=SUMIFS($B$2:$B$9,$A$2:$A$9,"<>"&$G$2,$A$2:$A$9,"<>")Enter in G7 in this example's workbook. The download contains the complete source and all result formulas.
Matching ignores letter case and keeps spaces significant. The separate nonblank criterion deliberately leaves out the empty status. G2 contains plain text without wildcard symbols.
Download this example's workbookRequire the same status to differ from both G2 and G3. Pending and Cancelled are both excluded. A paid refund still reduces the total.
=SUMIFS($B$2:$B$9,$A$2:$A$9,"<>"&$G$2,$A$2:$A$9,"<>"&$G$3,$A$2:$A$9,"<>")Enter in G7 in this example's workbook. The download contains the complete source and all result formulas.
All criteria pairs in this SUMIFS must hold on one row. Repeating the status range is intentional. Blank statuses are explicitly excluded; G2:G3 are plain text labels.
Download this example's workbookAdding a not-Pending subtotal to a not-Cancelled subtotal returns 700. A Paid row enters both subtotals; each excluded label still enters the other branch. Column C counts these inclusions.
=SUMIFS($B$2:$B$9,$A$2:$A$9,"<>"&$G$2,$A$2:$A$9,"<>")+SUMIFS($B$2:$B$9,$A$2:$A$9,"<>"&$G$3,$A$2:$A$9,"<>")Enter in G7 in this example's workbook. The download contains the complete source and all result formulas.
This is a deliberate incorrect construction for excluding both labels. Use the two-exclusions AND example for that task. Refunds can be counted twice too; the overlap affects signed amounts.
Download this example's workbookThe quoted not-equal operator by itself requests a nonblank status. The invoice with no status contributes nothing, while numeric zero and the matching negative amount remain valid amounts.
=SUMIFS($B$2:$B$9,$A$2:$A$9,"<>")Enter in G7 in this example's workbook. The download contains the complete source and all result formulas.
Only the status column is tested. The G2:G3 exclusion controls are not used. A space-only label is text rather than an empty cell; this supplied source uses a genuine blank.
Download this example's workbookPlace a tilde before each star in G2. The criterion treats Part*1 as one literal label, so PartX1 still contributes. The resulting total is 440.
=SUMIFS($B$2:$B$9,$A$2:$A$9,"<>"&SUBSTITUTE($G$2,"*","~*"),$A$2:$A$9,"<>")Enter in G7 in this example's workbook. The download contains the complete source and all result formulas.
This reference supports labels containing stars but no question marks or tildes. SUBSTITUTE escapes each star before adding <>. Matching ignores letter case and explicitly excludes genuine blank statuses.
Download this example's workbookLeaving the star unescaped makes Part*1 a pattern. It matches both Part*1 and PartX1 in this source, so both amounts are excluded and the total becomes 370.
=SUMIFS($B$2:$B$9,$A$2:$A$9,"<>"&$G$2,$A$2:$A$9,"<>")Enter in G7 in this example's workbook. The download contains the complete source and all result formulas.
Use this example only when pattern matching is intended. It answers a different question from literal-label exclusion. These supplied labels have no other Part-prefix/end-1 matches; blank statuses remain explicitly excluded.
Download this example's workbookSUMIFS uses AND logic across these criteria pairs. An East record with the wrong status is excluded, as is a paid record from West. To express an OR condition, you would need a different construction.
Excel stores dates as serial numbers. This example uses the Excel 1900 date system: 46296 is October 1, 2026, and 46327 is November 1, 2026. Keep the start inclusive and the following period’s start exclusive; it also avoids dropping records with times on the final day.
All four data ranges cover rows 2 through 9. Amounts and dates in this practice are numeric; text that only looks like a number needs cleaning first. Region and status labels are matched without regard to case. The example uses plain criteria without wildcard symbols.
The first SUMIFS argument is the range to add. Conditions come after it.
D2:D9Compare each region with G2. A row from another region cannot contribute.
B2:B9,G2The status test is another requirement on that same row. Both the region and status must match.
C2:C9,G3Join the comparison symbol to the numeric date in G4. Dates here are Excel serial values so the boundary is explicit.
A2:A9,">="&G4Use an exclusive end. A record exactly on G5 belongs to the next period and is not included.
A2:A9,"<"&G5Include refunds as negative amounts. A filter with no matching rows returns zero. Change a condition and compare the rows again.
Using <= with the next period’s first day includes a record that belongs to the next period.
A negative matching amount is still part of the sum. Do not add an amount>0 condition unless the task calls for gross sales.
SUMIFS pairs positions across ranges. Keep the same first and last row for every range.
Published examples, formula filling and practice checks were tested in Chrome on October 13, 2026. Tests cover the supplied datasets and stated input rules, not every possible formula. These workbooks have not yet been independently recalculated in Microsoft Excel or Google Sheets.
Content version 3. Practice checks compare calculated results across different datasets; they do not certify every possible formula.