Try:
Formula: copy to clipboard
=SUMPRODUCT($D$13:$X$20,($D$10:$X$10=E$30)*($B$13:$B$20=$D31))


Edit: Whoops have not seen the previous answer.