Skip to main content

How to Sum Values Between Two Dates in Excel with SUMIFS

· 4 min read
Jagdish Kumawat
Founder @ Dewiride

To add up only the rows dated within a range, give SUMIFS two conditions on the same date column: on or after the start, ">="&start, and before the end, "<"&end. The comparison sign goes in quotes and & joins it to the cell with the date.

The example is from the Monthly totals sheet of the old overtime timesheet in Part 1 of the Overtime Timesheet series, which totals each month's hours.

Prerequisites​

  • A column of values to add and a column of dates, such as Hours and Date in the OvertimeLog table.
  • The start date in a cell. Here B1 holds 01/10/2026.

The Formula​

This is the formula in B2 of the monthly totals, Aisha Khan's hours from 1 October up to, but not including, 1 November:

Monthly totals → B2
=SUMIFS(OvertimeLog[Hours],OvertimeLog[Employee],$A2,OvertimeLog[Date],">="&B$1,OvertimeLog[Date],"<"&EDATE(B$1,1))

The two date conditions are the part this guide is about:

SUMIFS adds the Hours of the rows where every condition is true, and the employee condition, OvertimeLog[Employee],$A2, is covered in How to Total Hours by Person and Month in Excel with SUMIFS. Leave it out, and the same two date conditions add up everyone's hours for the month. Copied across the grid, the formula gave these totals, 43.25 hours in October:

The Monthly totals sheet with each person's hours per month and the Total row showing 43.25 for Oct 2026 and 17 for Nov 2026

Why the Quotes and the &​

A condition is text that Excel reads as a test. ">=01/10/2026" would work for one fixed date, but the date is in a cell. ">="&B$1 builds the same test from the cell: & joins the text >= to the date in B1. Microsoft's SUMIF function uses the same pattern, ">" & C2, and says any condition with a comparison sign must be in double quotes.

Why the End Is "Before the Next Month"​

  • Months have different lengths. "Before the 1st of next month" works for every month without knowing its last day.
  • Dates with times are counted. A shift logged at 31/10/2026 22:00 is after 31/10/2026, so <=31/10/2026 would miss it; <01/11/2026 doesn't.

Common Mistakes​

MistakeWhat happensDo this instead
">=B1" with the cell inside the quotesExcel compares with the text "B1" and finds nothing">="&B1
"<="& the last day of the monthEntries with a time on the last day are left out"<"& the next month's first day
A start date stored as textThe test compares dates with text and adds nothingMake sure the cell holds a real date

Troubleshooting​

SymptomLikely causeFix
The total is 0The condition is in quotes with the cell, or the dates are text">="&B1, and real dates
One day's entries are missingThe end test is <= on a date and some entries have timesUse < the next day

FAQ​

Can the end date be in a cell too?​

Yes: "<"&C1, with the end date in C1.

Does it work for dates without a table?​

Yes. Use ranges such as B2:B100 instead of table columns, the same size for every range.

Conclusion​

Two conditions on one date column, ">="&start and "<"&end, add up everything in a range. Keep the sign in quotes, join the cell with &, and end before the next period starts.

Additional Resources​