Question

I have the following two tables. The first is a set of date ranges with three values assigned to each date range.

Start Date   End Date   A Hours    B Hours   C Hours
1/1/2014     1/10/2014  5          10        0
1/2/2014     1/5/2014   10         0         5
1/5/2014     1/15/2014  5          5         5
1/10/2014    1/30/2014  0          0         15

The second table is a list of dates with the same three values for each date.

Date       A Hours    B Hours   C Hours
1/1/2014            
1/2/2014            
1/3/2014            
1/4/2014            
1/5/2014            

I am looking to find the total number of A Hours, B Hours and C hours per day based on the date range in table one.

Thank you!

Was it helpful?

Solution

Here is an example using SUMIFS()

H2 formula =SUMIFS(C:C,A:A,"<="&G2,B:B,">="&G2)

I2 formula =SUMIFS(D:D,A:A,"<="&G2,B:B,">="&G2)

J2 formula =SUMIFS(E:E,A:A,"<="&G2,B:B,">="&G2)

Drag formulas down

Results:

enter image description here

OTHER TIPS

Use this one in B9 and drag it down and across (see image below):

=SUMPRODUCT(($A9>=$A$2:$A$5)*($A9<=$B$2:$B$5)*(C$2:C$5))

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top