You can add a helper column in D3:
=A3&"_"&B3&"_"&C3
copied down, then in H4:
=COUNTIF($D$3:$D$20,$G4&"_"&H$3&"_"&$F$3)+COUNTIF($D$3:$D$20,$G4&"_"&H$3&"_"&$F$4)+COUNTIF($D$3:$D$20,$G4&"_"&H$3&"_"&$F$5)
copied down and across...
if you had XL2007 or later, H4 would be:
=SUMPRODUCT(COUNTIFS($A$3:$A$20,$G4,$B$3:$B$20,H$3,$C$3:$C$20,$F$3:$F$5))
copied down and across...
Bookmarks