Function Problems

Use SUMIFS to Sum Values Between Two Dates in Excel

Olivia MillerOlivia Miller Dec 2, 2026 868 views

Question details

Calculate a total for values whose associated dates fall between a FROM date and a TO date.

Use SUMIFS to Sum Values Between Two Dates in Excel
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.
Before you start

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.

Solution 1Recommended

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.

1
Select the result cell

Click the cell where you want the total to appear.

2
Enter the formula

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.

3
Copy the formula if needed

Drag the result cell's fill handle down to calculate totals for additional FROM and TO dates in subsequent rows.

Sum values between two dates with SUMIFS
Dates with times: If source dates include times and G2 contains a date without a time, use "<"&($G2+1) instead of "<="&$G2 to include the entire TO date.
Calculate date-range totals

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. 1. Open your spreadsheet: Open WPS Spreadsheets and select Open to load your workbook.
  2. 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. 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. 4. Fill additional rows: Drag the result cell's fill handle down if you have more date ranges to calculate.
Sum values for an inclusive date range with SUMIFS.Open and save Microsoft Excel XLSX files.Copy formulas down for multiple reporting periods.
microsoft office alternative - wps office

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.