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):

RowA: DateB: ClientC: Amount
206 Jan 2026Northstar120
328 Jan 2026Acme80
403 Feb 2026Northstar240
520 Feb 2026Acme60
601 Mar 2026Northstar150
712 Mar 2026Acme310
820 Mar 2026Acme
931 Mar 2026 15:40Acme220
1025 Mar 2026Acme75
1102 Apr 2026Northstar500

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.

Google Sheets with F3 selected, showing the inclusive SUMIFS ending at "<="&F2 in the formula bar and a March total of 460 that misses the 15:40 invoice on March 31.
Screenshot: Google Sheets, Nov 2026

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.

Google Sheets with F4 selected, showing the exclusive SUMIFS ending at "<"&F2+1 in the formula bar and a March total of 680 that includes the 15:40 invoice.
Screenshot: Google Sheets, Nov 2026

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.

Oscar

Spreadsheet nerd who writes about Excel and Google Sheets formulas.

Google Sheets, 16 November 2026, tab sumifs-between-dates. F1=DATE(2026,3,1), F2=DATE(2026,3,31) stored 46112. A9=DATE(2026,3,31)+TIME(15,40,0) stored 46112.65277777778; A9>F2 was TRUE, A9<=F2 FALSE, A9<F2+1 TRUE. Inclusive SUMIFS "<="&F2 returned 460. Exclusive "<"&F2+1 and "<"&(F2+1) returned 680. A10 typed with a leading apostrophe displayed 25 Mar 2026, LEN 11, ISNUMBER FALSE, ISTEXT TRUE; C8 was blank. After replacing A10 with DATE(2026,3,25), "<="&F2 returned 535 and "<"&F2+1 returned 755. DATE(2026,3,1) / DATE(2026,4,1) exclusive totals were 680 with the text date and 755 after the fix. Criteria ">=F1" and "<=F2" (letters inside the quotes) returned 0. Quoted ">=3/1/2026" and "<=3/31/2026" returned 0. Quoted ISO ">=2026-03-01" and "<=2026-03-31" returned 460. EDATE month totals were 200, 300, and 680; EOMONTH(H,0)+1 matched EDATE(H,1). After fixing A10, the March EDATE total was 755. SUMIFS with MONTH(A2:A11) as the criteria range returned #VALUE!. SUMPRODUCT(--(MONTH=3), amounts) returned #VALUE! while A10 was text, and 755 after the fix; adding a 15 Mar 2025 amount of 99 made it 854. MONTH of a blank cell returned 12. Acme with "<"&F2+1 returned 530, then 605 after the A10 fix. Excel was not re-run.

Next in Lookup & Conditional Sums ROAS Formula in Excel and Google Sheets From an Ad Export