You can use an array formula

=SUM(IF(C7:C16=C2,IF(ISNUMBER(D7:F16),D7:F16)))

which needs to be confirmed with CTRL+SHIFT+ENTER