How i Tackled this is to use this Function
=SUMPRODUCT((Sheet2!A1:A25=2001)*(Sheet2!B1:B25="d ec")*(Sheet2!K1:K25))/SUMPRODUCT(((Sheet2!A1:A25=2001)*(Sheet2!B1:B25="d ec")))
the Numerator produces the sum of all the values in K1:K25 where your two conditions apply.
The Denominator counts all the cases where A1:A25 = 2001 and B1:B25 = "dec"
so the average is Sum/Count
Hope this Helps
David