SUMIFS Between Two Dates Returns the Wrong Total
SUMIFS between two dates can miss end-of-day transactions or text dates. Fix the range, check date values, and total each month correctly in Excel.
On this page
Your March invoice total shows 460 even though a 220 invoice landed on March 31. SUMIFS between two dates can miss transactions that carry a time, and it can also skip dates stored as text.
Enter this invoice log in A1:C11 (headers in row 1):
| Row | A: Date | B: Client | C: Amount |
|---|---|---|---|
| 2 | 06 Jan 2026 | Northstar | 120 |
| 3 | 28 Jan 2026 | Acme | 80 |
| 4 | 03 Feb 2026 | Northstar | 240 |
| 5 | 20 Feb 2026 | Acme | 60 |
| 6 | 01 Mar 2026 | Northstar | 150 |
| 7 | 12 Mar 2026 | Acme | 310 |
| 8 | 20 Mar 2026 | Acme | |
| 9 | 31 Mar 2026 15:40 | Acme | 220 |
| 10 | 25 Mar 2026 | Acme | 75 |
| 11 | 02 Apr 2026 | Northstar | 500 |
Use real dates except in A10, where a leading apostrophe makes 25 Mar 2026 text. For A9, enter =DATE(2026,3,31)+TIME(15,40,0) and display the time. Leave C8 blank. Set F1 to =DATE(2026,3,1) and F2 to =DATE(2026,3,31).
The usual formula is:
=SUMIFS(C2:C11,A2:A11,">="&F1,A2:A11,"<="&F2)
It returns 460, the sum of the March 1 and March 12 invoices. The blank amount contributes nothing. It misses both A9 and the text date in A10, for different reasons.
Why March 31 disappears even though the end date is inclusive
F2 is March 31 at 00:00, the start of that day. In this test A9 stored 46112.65277777778 and F2 stored 46112, so A9 is later than F2. The condition "<="&F2 excludes it.
Use an exclusive upper boundary at the start of the next day:
=SUMIFS(C2:C11,A2:A11,">="&F1,A2:A11,"<"&F2+1)
This returns 680. It includes the 220 invoice on March 31 without including the 500 invoice on April 2. "<"&(F2+1) returns the same 680.
I’d use this start-inclusive, next-day-exclusive pattern even when the current log shows only dates. A later import may bring in timestamps, and a formula that once seemed fine will start undercounting. For more on the underlying date numbers, see the date and time cheat sheet.
The other missing invoice is a text date
A10 looks like a date but isn’t a numeric date value. Check it in any empty cell:
=ISNUMBER(A10)
That returns FALSE, while =ISTEXT(A10) returns TRUE. The leading apostrophe is a text-entry prefix; it isn’t part of the displayed value (LEN was 11, matching 25 Mar 2026). SUMIFS does not raise an error: the text date simply doesn’t satisfy the numeric range criteria.
Replace A10 with the real date =DATE(2026,3,25) and display it as a date. The corrected March total with "<"&F2+1 becomes 755: 150 + 310 + 220 + 75. The inclusive "<="&F2 formula only rose to 535, because it still dropped the 15:40 invoice. If imported dates have this problem across hundreds of rows, use the checks in dates stored as text rather than fixing entries one by one.
A total of zero has other possible causes too, particularly when none of the dates are real date values. The SUMIF and SUMIFS returns zero guide covers those checks.
Don’t put the cell reference inside quotation marks
This criterion is wrong:
">=F1"
It means the literal text >=F1, not “greater than or equal to the value in cell F1.” In this test, ">=F1" and "<=F2" returned 0. Use ">="&F1 instead.
Writing a date directly as ">=3/1/2026" is also a poor idea. In this Google Sheets test, ">=3/1/2026" and "<=3/31/2026" returned 0. The ISO-style pair ">=2026-03-01" and "<=2026-03-31" returned 460, the same inclusive-end total as "<="&F2. If you don’t want date inputs in F1:F2, build the dates with DATE and keep the exclusive upper bound:
=SUMIFS(C2:C11,A2:A11,">="&DATE(2026,3,1),A2:A11,"<"&DATE(2026,4,1))
With A10 still stored as text, this returns 680. After A10 is a real date, it returns 755. I did not re-run these in Excel. In locales that use semicolons as formula argument separators, replace the commas accordingly.
Sum each month without typing its last date
Put actual first-of-month dates in H2:H4: =DATE(2026,1,1), =DATE(2026,2,1), and =DATE(2026,3,1). Format those cells as mmm yyyy if you only want to display the month.
In I2, enter:
=SUMIFS($C$2:$C$11,$A$2:$A$11,">="&H2,$A$2:$A$11,"<"&EDATE(H2,1))
Copy it to I3:I4. EDATE(H2,1) supplies the first day of the next month, so there’s no need to remember how many days each month has. In this test, EOMONTH(H2,0)+1 matched EDATE(H2,1) when H2 was the month’s first day, and the January, February, and March totals were 200, 300, and 680.
That March number assumes A10 is still text. Once it’s converted to a real date, I4 becomes 755. This is the monthly summary I’d keep in a working spreadsheet: it stays inside March 2026 and still includes a timestamp on the last day.
You might try putting MONTH(A2:A11) directly into a SUMIFS criteria-range argument. That argument expects a range of cells, not a calculated array, and in this test =SUMIFS(C2:C11,MONTH(A2:A11),3) returned #VALUE!. SUMPRODUCT can do a month-number test, but only after the dates are real numbers. While A10 was text, =SUMPRODUCT(--(MONTH(A2:A11)=3),C2:C11) also returned #VALUE!. After fixing A10, that formula returned 755:
=SUMPRODUCT(--(MONTH(A2:A11)=3),C2:C11)
The drawback is that it counts every March in every year, not just March 2026. When I added a 15 March 2025 amount of 99 to the same test, SUMPRODUCT became 854; the EDATE SUMIFS for March 2026 stayed at 755. Blank date cells are another trap: MONTH of a blank cell returned 12 in this Google Sheets test, so a December total would pick those rows up. I did not re-run the blank-cell case in Excel. The date-boundary SUMIFS avoids both issues.
If you also want only Acme’s March invoices, add the client range as one more condition:
=SUMIFS(C2:C11,A2:A11,">="&F1,A2:A11,"<"&F2+1,B2:B11,"Acme")
That returns 530 before repairing A10, and 605 afterward.