ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Sum select cells based on date range (https://www.excelbanter.com/excel-worksheet-functions/178712-sum-select-cells-based-date-range.html)

chad

Sum select cells based on date range
 
Here's the table I have

Date # Days Open
02/01/2008 3
02/01/2008 2
02/05/2008 3
02/11/2008 1
02/11/2008 1
02/12/2008 14
02/15/2008 8
02/18/2008 2
02/18/2008 4
02/20/2008 4
02/21/2008 15
02/22/2008 1
02/26/2008 4
02/27/2008 9
02/27/2008 8
02/29/2008 1
02/29/2008 13

Date is manually input, # days open is calced using networkdays and another
manually input date.

Out of this table, I can count how many items fall within a date range based
using sumproduct. What I need to be able to do is sum the days that
fallwithin a date range. For example, the first date range is 02/01/2008 to
02/10/2008. I know there are 3 items there, but I want to add up the 3, 2,
and 3 for that range.

I have cell references indicating the date range I wish to use. What would
I add on to this formula to sumup the # days open for the given date range?
I'm using the formula =SUMPRODUCT((J9:J26=AM102)*(J9:J26<=AM103)) to
determine the # of items in the date range (date ranges in col AM). I should
come up with 8 for the date range of 02/01/2008 to 02/10/2008.

Thanks in advance for any help.


PCLIVE

Sum select cells based on date range
 
I prefer my SUMPRODUCTs this way.

=SUMPRODUCT(--(J9:J26=AM102),--(J9:J26<=AM103),K9:K26)

HTH,
Paul

--

"Chad" wrote in message
...
Here's the table I have

Date # Days Open
02/01/2008 3
02/01/2008 2
02/05/2008 3
02/11/2008 1
02/11/2008 1
02/12/2008 14
02/15/2008 8
02/18/2008 2
02/18/2008 4
02/20/2008 4
02/21/2008 15
02/22/2008 1
02/26/2008 4
02/27/2008 9
02/27/2008 8
02/29/2008 1
02/29/2008 13

Date is manually input, # days open is calced using networkdays and
another
manually input date.

Out of this table, I can count how many items fall within a date range
based
using sumproduct. What I need to be able to do is sum the days that
fallwithin a date range. For example, the first date range is 02/01/2008
to
02/10/2008. I know there are 3 items there, but I want to add up the 3,
2,
and 3 for that range.

I have cell references indicating the date range I wish to use. What
would
I add on to this formula to sumup the # days open for the given date
range?
I'm using the formula =SUMPRODUCT((J9:J26=AM102)*(J9:J26<=AM103)) to
determine the # of items in the date range (date ranges in col AM). I
should
come up with 8 for the date range of 02/01/2008 to 02/10/2008.

Thanks in advance for any help.




chad

Sum select cells based on date range
 
Thanks! worked like a charm!

"PCLIVE" wrote:

I prefer my SUMPRODUCTs this way.

=SUMPRODUCT(--(J9:J26=AM102),--(J9:J26<=AM103),K9:K26)

HTH,
Paul

--

"Chad" wrote in message
...
Here's the table I have

Date # Days Open
02/01/2008 3
02/01/2008 2
02/05/2008 3
02/11/2008 1
02/11/2008 1
02/12/2008 14
02/15/2008 8
02/18/2008 2
02/18/2008 4
02/20/2008 4
02/21/2008 15
02/22/2008 1
02/26/2008 4
02/27/2008 9
02/27/2008 8
02/29/2008 1
02/29/2008 13

Date is manually input, # days open is calced using networkdays and
another
manually input date.

Out of this table, I can count how many items fall within a date range
based
using sumproduct. What I need to be able to do is sum the days that
fallwithin a date range. For example, the first date range is 02/01/2008
to
02/10/2008. I know there are 3 items there, but I want to add up the 3,
2,
and 3 for that range.

I have cell references indicating the date range I wish to use. What
would
I add on to this formula to sumup the # days open for the given date
range?
I'm using the formula =SUMPRODUCT((J9:J26=AM102)*(J9:J26<=AM103)) to
determine the # of items in the date range (date ranges in col AM). I
should
come up with 8 for the date range of 02/01/2008 to 02/10/2008.

Thanks in advance for any help.






All times are GMT +1. The time now is 08:19 PM.

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