OK. I think that this is it. One formula for the lot. I needed to remove a space in 2013 /2014 to give 2013/14 in "Count": to match the column headers in "Data" and the blank rows in your desired result.
Formula:
=SUMPRODUCT(OFFSET((Data!$B$3:$B$21),,MATCH($A15,Data!$A$1:$I$1,0)-1,,)*(OFFSET(Data!$A$3:$A$21,,MATCH($A15,Data!$A$1:$I$1,0)-1,,)<=DATEVALUE(TEXT(TODAY(),"dd-mm-")&RIGHT($A15,2))*(OFFSET(Data!$C$3:$C$21,,MATCH($A15,Data!$A$1:$I$1,0)-1,,)=C$13)))
Thanks to Hemesh for making me realise that if it could work for one dataset, it could be made to work for them all
Bookmarks