you could use sumproduct if your workig with numbers

try this

=SUMPRODUCT(($K$1:$V$1=$A2)*($J$3:$J$9=B$1),$K$3:$V$9)
(and switch your 0s to view on in excel options)