Excel Productivity Guide
Useful Excel Tips | Keyboard Shortcuts | VBA Codes
Download this Free E-Book to take your excel skills to a whole next level using some smart Excel tactics.
Worth $20, Absolutely Free
Let’s say, you are working in a trading company and your boss tells you to get the total sales amount for last 15 days.
In this case, you need to sum sales amount from the current date to 15 days prior i.e. between two dates.
Which formula would you use?
Well, if you ask me, SUMIFS is the best method to sum values between two dates.
Yes, you heard it right?
Let me tell you how.
Here, you have a range of two dates which includes total 15 days and you need to sum values for all of them.
And, SUMIFS if a function which can help you to sum values between two different criteria. And, two dates are those criteria for you.
Today, in this post, you will learn this simple method to sum values between two dates in Excel using SUMIFS Function.
And, you will also learn how can you create a dynamic range of dates to get the sum.
It can help you to sum values by specifying more than one criteria. In short, it will only sum those cells where all the conditions are met.
In above syntax, first of all, you need to refer to the range from where you want to sum values, then the range to check for criteria and after that criteria to check and so on.
Here you have sales data for the month of Jan and you need to sum values between 15-Jan-2017 to 25-Jan-2017.
Download this sample date file from here to follow along.
In the D2 cell, insert below formula and hit enter:
When you hit enter, this function will return $15,682 in the cell which is the sum of the amount between 15-Jan-2017 to 25-Jan-2017.
And here in this calculation, you have included both start and end date as well.
To verify this calculation, just select amount cells from 15-Jan-2017 to 25-Jan-2017 check out your status bar for the sum of these values or you can also filter values to check it.
In above formula, you have used logical operators with SUMIFS which helps to add a condition while calculating the sum.
Let’s break down the formula to understand it.
There is also a situation when you need to sum values between two dates on an ongoing basis.
Let’s say, you need to sum values for last 7 days and this should be dynamic so that every day you get the sum of last 7 days.
So, the formulas will be:
In above formula, you have used today function to get the current dynamic date which will change automatically.
The first criterion tells the function to sum only those values which are equals to or lower than today’s date.
And, the second criterion tells the function to sum only those values which are equals to or lower than the date which is 6 days before than today.
Now, the range of two dates will be something like this: from today to six days back which means you have total seven days.
And the function will only sum values which are in this range.
Download this sample file from here to learn more.
As I said, SUMIFS is the best way to get sum of data between a range of two dates.
One thing which you need to take care use lower than a logical operator with upper date and greater than with the lower date.
I hope you found this tip useful.
Now tell me one thing. Do you know any other method to sum values between two dates? Please share your views with me in the comment section, I'd love to hear from you.
And, please don't forget to share this tip with your friends.