multiple criteria in if or sumproduct

T

tbird0566

I am trying to set up a leave time report for people to use. The forma
is below:


Date Type or Leave Hours Taken
07/01/2005 A 8
07/15/2005 A 6
08/15/2005 S 5
etc etc etc


I need a formula to look at the date and find all leave taken for
specific type of leave for the month and then total the hours taken fo
that month. For instance, in the above example 14 hours for the mont
of July. I only need the result of 14.
Please help. :
 
A

Aladin Akyurek

Let A1:C4 house the sample you provided.

In E2 enter: 1-Jul-2005

which you might want to format as Jul-05 for display purposes.

In F2 enter: A

which is a type value.

In G2 enter:

=SUMPRODUCT(--($A$2:$A44-DAY($A$2:$A$4)+1=E2),--($B$2:$B$4=F2),$C$2:$C$4)
 
Top