Use SUMIFS to Sum Values Between Two Dates in Excel
Question details
Calculate a total for values whose associated dates fall between a FROM date and a TO date.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet has source dates and values, plus FROM and TO date cells that define the reporting period.
- Observed behavior
- The desired total includes values associated with dates on or between the FROM and TO dates.
Check that the source dates and the FROM and TO cells contain real Excel dates, not text. Confirm that the date range and the values range cover the same rows.
Sum values between two dates with SUMIFS
Use SUMIFS to include values from both the FROM date and the TO date.
In this example, A2:A20 contains dates, B2:B20 contains values, F2 contains the FROM date, and G2 contains the TO date.
Click the cell where you want the total to appear.
Type =SUMIFS(B$2:B$20,$A$2:$A$20,">="&$F2,$A$2:$A$20,"<="&$G2) and press Enter. Adjust the ranges and date cells to match your worksheet.
Drag the result cell's fill handle down to calculate totals for additional FROM and TO dates in subsequent rows.

Use SUMIFS for date ranges in WPS Spreadsheets
Enter the same SUMIFS formula in WPS Spreadsheets to total values between two dates and copy it for additional periods.
- 1. Open your spreadsheet: Open WPS Spreadsheets and select Open to load your workbook.
- 2. Check the date cells: Verify that A2:A20 contains source dates, B2:B20 contains values, and F2 and G2 contain the FROM and TO dates, or identify the equivalent cells in your sheet.
- 3. Enter SUMIFS: Click the result cell, enter =SUMIFS(B$2:B$20,$A$2:$A$20,">="&$F2,$A$2:$A$20,"<="&$G2), and press Enter.
- 4. Fill additional rows: Drag the result cell's fill handle down if you have more date ranges to calculate.

Frequently Asked Questions
Does the SUMIFS formula include both dates?
Yes. The criteria ">="&$F2 and "<="&$G2 include both endpoints when the cells contain dates without times.
How do I include source dates that have times?
If G2 contains a date without a time, replace the final criterion with "<"&($G2+1). This includes all times on the TO date.
Why does my formula return zero when dates appear to match?
Check whether the source dates and the FROM and TO cells are real dates rather than text. Also verify that the date and sum ranges cover the same rows and that the FROM date is not later than the TO date.
Can I copy the formula for several date ranges?
Yes. Enter each FROM and TO date in columns F and G, then drag the formula's fill handle down. The $F2 and $G2 references change rows as you copy.




