PDA

View Full Version : [SOLVED:] Sum values between two specified dates



ryanrmbcap
03-31-2016, 01:43 PM
Hi Everyone - I realize this isn't a VBA topic but I'm stuck on finding the right formula here. I need to use a sum formula that's dynamic and will change based on start and end date imputs. For example, the below table I'd like to calculate all values between 02/29/2016 to 03/24/2016. The answer is 0.731. Can someone suggest how I can write a conditional formula to calculate all values between two specified dates? Thanks in advance.



Date
Value


2/29/2016
0.038


3/1/2016
0.118


3/2/2016
0.052


3/3/2016
0.031


3/4/2016
0.083


3/7/2016
0.049


3/8/2016
-0.015


3/9/2016
0.015


3/10/2016
0.094


3/11/2016
0.101


3/14/2016
0.07


3/15/2016
0.003


3/16/2016
-0.011


3/17/2016
0.056


3/18/2016
0.019


3/21/2016
0.045


3/22/2016
0.032


3/23/2016
-0.029


3/24/2016
-0.02

p45cal
03-31-2016, 03:02 PM
You don't tell us which version of Excel you're using.
Try along the lines of:
=SUMIFS(B2:B20,A2:A20,">=" & F3,A2:A20,"<=" &G3)
where cell F3 contains the earlier date and cell G3 contains the later date, column A the dates and column B the values.

ryanrmbcap
04-18-2016, 12:39 PM
You don't tell us which version of Excel you're using.
Try along the lines of:
=SUMIFS(B2:B20,A2:A20,">=" & F3,A2:A20,"<=" &G3)
where cell F3 contains the earlier date and cell G3 contains the later date, column A the dates and column B the values.


That worked perfectly! I'm using Excel 2007. Thank you very much for your help.