Formula for totals between certain dates?

harriesh

New Member
Joined
Mar 28, 2011
Messages
3
I'm sure this is a simple one for you guys but I've been trying for the last hour or so. What I have is a column A with dates and a column B with values. I need a formula that will give me the total value of only those that are within certain dates. e.g. 01/01/2010 & 28/02/2010. Many thanks.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Hi and welcome to the board,

Something like this maybe?

=SUMPRODUCT(--(A1:A26>=DATE(2010,1,5)),--(A1:A26<=DATE(2010,1,10)),B1:B26)
 
Upvote 0
Harriesh,

Please note that with Stefan's formula whole columns can only be used within SUMPRODUCT in Excel 2007 onwards. Also its quite inneficient to have the formula calculating for every row when you probably only need a few rows within the formula.
 
Upvote 0
Using the following formula, if I replace the date within the bracktets to a cell instead, it doesn't like it. How can I insert a cell instead of the actual date?

=SUMPRODUCT(--(A1:A26>=DATE(2010,1,5)),--(A1:A26<=DATE(2010,1,10)),B1:B26)
 
Upvote 0
Hi,

Like this;

=SUMPRODUCT(--(A1:A26>=C1),--(A1:A26<=C2),B1:B26)

The DATE function has these arguments DATE(Year,Month,Day)
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,280
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top