Try this....

In F23
=AVERAGEIFS($G$10:$G$19,$H$10:$H$19,$E23,$D$10:$D$19,F$22)
and then copy across and down.