
Originally Posted by
his5r2m
p.s. if Donkeyote reads this, I know you said that countif is better then sumproduct but I coundnt get it to work for me!
Yes, if backwards compatibility is not an issue you really should use COUNTIFS as it is significantly more efficient... the formula you would use would be:
B3:
=COUNTIFS(Incidents!$A$4:$A$302,$A$1,Incidents!$B$4:$B$302,B$2,Incidents!$C$4:$C$302,">="&$A3,Incidents!$C$4:$C$302,"<"&EDATE($A3,1))
Applied across Matrix.
(note use of EDATE - in XL2007 this is available by default whereas in earlier versions it required activation of the Analysis ToolPak Add-In (via Tools))
Bookmarks