ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   select date range in column (https://www.excelbanter.com/excel-worksheet-functions/98535-select-date-range-column.html)

garlocd

select date range in column
 
I need to be able to sum one column based on dates in another column.

Thankful for any help on this.

Biff

select date range in column
 
Hi!

Try this:

D1 = start date
E1 = end date

Sum values in column B where the corresponding dates in column A fall within
the date range (inclusive):

=SUMIF(A1:A20,"="&D1,B1:B20)-SUMIF(A1:A20,""&E1,B1:B20)

Or:

=SUMPRODUCT(--(A1:A20=D1),--(A1:A20<=E1),B1:B20)

Biff

"garlocd" wrote in message
...
I need to be able to sum one column based on dates in another column.

Thankful for any help on this.




Max

select date range in column
 
"garlocd" wrote:
I need to be able to sum one column based on dates in another column.


One way ..

Assuming real dates are within $A$2:$A$100,
with values to be summed in $B$2:$B$100

Try something like this in say, C1:
=SUMPRODUCT(($A$2:$A$100= -- "1-Jun-2006")*($A$2:$A$100<= --
"15-Jun-2006"),$B$2:$B$100)

Adapt to suit, but note that entire col references eg: A:A, B:B, cannot be
used in SUMPRODUCT
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


All times are GMT +1. The time now is 02:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com