30 Advanced Excel Tips for 2026

Excel Champs / Excel Formulas List / SUMIFS Date Range (Sum Values Between Two Dates Array)
By Puneet Gogia (Microsoft MVP)

SUMIFS Date Range (Sum Values Between Two Dates Array)

30+ Advanced Excel Tips for 2026

No spam. Only Excel Stuff. God Promise. 😊

To sum values between two dates, use SUMIFS with two conditions on the same date column: =SUMIFS(B2:B31,A2:A31,">="&E1,A2:A31,"<="&E2), where E1 holds the start date and E2 the end date.

The operators go inside double quotes and join to the cell reference with & — typing the date inside the quotes instead works in some regions and fails in others, so referencing a cell is the safer habit. Both ends are included; drop the equal signs to exclude them.

To type the dates into the formula, build them with DATE rather than as text: =SUMIFS(B2:B31,A2:A31,">="&DATE(2026,1,15),A2:A31,"<="&DATE(2026,1,25)). For a rolling window, use TODAY: =SUMIFS(B2:B31,A2:A31,">="&TODAY()-6,A2:A31,"<="&TODAY()) sums the last seven days and updates itself daily.

Two things that cause a wrong total: dates stored as text, which SUMIFS skips entirely, and dates carrying a time component — 25-Jan 14:00 is later than 25-Jan, so it falls outside a <= end date. Use "<"&E2+1 when your data has timestamps.

Yes, you heard it right.

SUMIFS is the easiest and best method to sum values between two dates (i.e., a range of dates).

Let me tell you something. Suppose you work in a trading company, and your boss asks you to calculate the total sales amount for the last 15 days.

In this case, you can sum the sales amount from the current date to 15 days prior, i.e., between two dates.

Let me tell you how. Here, you have a range of two dates, including 15 days, and you need to sum the values for all.

With SUMIFS, you can add those two dates as criteria. It works like a range and sums up all the values within that range.

Quick Intro: SUMIFS can help you sum values by specifying multiple criteria. In short, it will only sum up those cells where all the conditions are met.

=SUMIFS(sum_range,range1,criteria1,[range2],[criteria2],…)

In the above syntax, first, you need to refer to the range from where you want to sum values, then the range to check for criteria, and after that, the criterion to check, and so on.

Formula to Sum Values Between Two Dates in Excel

Here, you have sales data for January, and you need to sum the values between 15-Jan-2017 (start date) and 25-Jan-2017 (end date).

raw-data.xlsx

data to sum values between two dates using SUMIFS

Now copy the formula that we have mentioned below and then paste it into cell D2.

And then hit enter.

=SUMIFS(B2:B31,A2:A31,">=15-Jan-2017",A2:A31,"<=25-Jan-2017")

When you hit enter, this function will return $15,682 in the cell, the sum between 15-Jan-2017 (start date) and 25-Jan-2017 (end date).

And here, in this calculation, you have included both start and end dates.

formula to sum values between two dates

To verify this calculation, select the amount cells from 15 January 2017 to 25 January 2017 and check the status bar for the sum of these values.

You can also filter the values to check it.

check sum from status bar to verify that sum values between dates

Must Reads – Sum Greater than Values using SUMIF / Sum Not Equal Values (SUMIFS) in Excel / SUMIF / SUMIFS with an OR Logic in Excel / SUMIF with Wildcard Characters in Excel

Here’s How It Works.

In this formula, we have used logical operators with SUMIFS, which helps add a condition while calculating the sum.

Let’s break down the formula to understand it.

how this formula works to sum values between two dates
  • First, we have used range B2:B31 as a sum_range where we have the amount.
  • After that, we have referred to A2:A31 as the first criteria range and “>=15-Jan-2017” as the first criterion.
  • Next, we have again referred to A2:A31, but this time as the second criteria range and “<=25-Jan-2017” as a second criterion.

These two criteria tell the function to sum values equal to or greater than 15 January 2017 and equal to or lower than 25 January 2017.

So, at this point, we have two different criteria, one for the lower limit and one for the upper limit, which creates a range of dates.

The function will only sum those values within this range.

Must Read – Sum Values by Group / Sum Values Based on the Month (SUMIF) / Sum Values that are Greater than Zero (SUMIF) / Sum Values Less Than a Particular Value (SUMIF Less Than)

Sum Values Between a Dynamic Range of Dates

There can be a situation when you need to sum values between two dates on an ongoing basis.

Let’s say you need to sum values for the last seven days. This should be dynamic, so you get the sum of the last seven days daily.

So the formulas will be:

=SUMIFS(B2:B31,A2:A31,"<="&TODAY(),A2:A31,">="&(TODAY()-6))

This is how this formula works…

In the above formula, we have used the TODAY Function to get the current dynamic date, which will change automatically.

The first criterion tells the function to sum only those values equal to or lower than today’s date.

The second criterion tells the function to sum only those values equal to or greater than the date six days before today.

Now, the range of two dates will be something like this: from today to six days ago, meaning you have seven days.

The function will only sum values in this range.

Must Read – SUMIF to Sum Blank Values or Empty Cells / SUMIF Non-Blank (Sum Values for Non-Empty Cells) / SUMIF By Date (Sum Values Based on a Date) / Sum Values Based on Year (SUMIF Year)

The SUMIFS between dates formula is not working.

You might face a problem while using the same formula in your example; in this case, you need to check for a few common errors.

  • Date Format: If the dates are saved as text instead of an actual date, the formula cannot sum values using that date. So check if the dates are saved in the right format.
  • Correctly using > and < Operators: In this formula, you need to use the less than and greater than operators, so make sure to use them in the right way so that they create a correct date range to sum the values.
  • Range Needs to be of Same Size: In the formula, you need to define two ranges of the dates, basically the same range of cells twice. But here, make sure the range in both references is the same size.
  • Dates with Time: If your dates also have a time, a value on the end date like 25-Jan-2017 6:00 PM is greater than 25-Jan-2017, so “<=” leaves it out. Use “<” with the day after the end date instead (formula below this list).
  • Text Dates in the Formula: A date typed as text in the criteria, like “>=15-Jan-2017”, depends on the date settings of the computer. Using a cell or the DATE function is safer.
=SUMIFS(B2:B31,A2:A31,">="&D1,A2:A31,"<"&E1+1)

Must Read – Combine VLOOKUP with SUMIF / Sum IF Cell Contains a Specific Text (SUMIF Partial Text)

Using the DATE Function to Define the Dates

In the first formula of this tutorial, we have typed the dates directly in the formula as text. But if you want to enter the date directly in the formula, it’s better to use the DATE function.

In the date function, you can enter the year, month, and day as a number in the argument, and the function converts it into a valid date.

=DATE(year,month,day)

Now, if you take the formula that we used above and use the DATE function, the formula will be something like below:

=SUMIFS(B2:B31,A2:A31,">="&DATE(2017,1,15),A2:A31,"<="&DATE(2017,1,25))

You can see in the formula we have used the DATE function in the first criteria, DATE(2017,1,15), which returns the date 15-Jan-2017. In the second criteria, we have used DATE(2017,1,25), which returns 25-Jan-2017.

Use Start and End Dates from Cells

In most cases, you will want to change the dates without editing the formula. For this, enter the start date in cell D1 and the end date in cell E1, and join the operators with the cells using the ampersand:

=SUMIFS(B2:B31,A2:A31,">="&D1,A2:A31,"<="&E1)

The operator stays inside the double quotes, and the cell goes outside. If you write “>=D1”, SUMIFS looks for the text D1 and returns 0.

And if you don’t want to include the start and end dates in the sum, use “>” and “<” instead of “>=” and “<=”:

=SUMIFS(B2:B31,A2:A31,">"&D1,A2:A31,"<"&E1)

Sum Between Two Dates with Another Condition

As SUMIFS takes up to 127 pairs of ranges and criteria, you can add more conditions to the same formula. Let’s say you have product names in column C and want the sales of “Laptop” between the two dates:

=SUMIFS(B2:B31,A2:A31,">="&D1,A2:A31,"<="&E1,C2:C31,"Laptop")

Other Ways to Sum Between Two Dates

You can also use SUMPRODUCT, which works in all versions of Excel and doesn’t need the criteria in quotes:

=SUMPRODUCT((A2:A31>=D1)*(A2:A31<=E1)*B2:B31)

And in Excel 365 and Excel 2021, you can use FILTER inside SUM. The 0 at the end returns 0 when there are no dates in the range:

=SUM(FILTER(B2:B31,(A2:A31>=D1)*(A2:A31<=E1),0))

Frequently Asked Questions

Why does my SUMIFS between dates return 0?

The usual reasons are dates stored as text, the cell reference written inside the quotes (like “>=D1”), or a start date that is later than the end date. Check with =ISNUMBER(A2): it returns TRUE for a real date.

How do I sum values for the current month?

Use the first and last day of the month as the two dates: =SUMIFS(B2:B31,A2:A31,”>=”&EOMONTH(TODAY(),-1)+1,A2:A31,”<=”&EOMONTH(TODAY(),0)).

Can I count the entries between two dates as well?

Yes. Use COUNTIFS with the same date criteria: =COUNTIFS(A2:A31,”>=”&D1,A2:A31,”<=”&E1).

Puneet Gogia

Written by

Puneet Gogia

Microsoft MVP — Excel · Founder, Excel Champs

Twelve years of teaching Excel, and a decade before that using it as a data analyst. Every tutorial here is written from a file I actually built.

3M+ readers helped
1,000+ tutorials written
Since 2015 teaching Excel

3 thoughts on “SUMIFS Date Range (Sum Values Between Two Dates Array)”

  1. what if I want to do this but I want the range in the column I am pulling data from to be dynamic. I will continue to add new data to the column I am looking up data from and don’t want have to keep updating the range in each formula to include the new cells in the column?

    Reply
    • Meghanne, share the column name of the range which you can be dynamic in your formula.

      Reply
  2. use a SUMIFS formula with start and end dates as criteria
    Calculating from 1St July to 19th July data

    Reply

Leave a Comment