I show you 2 more options, including the option of marcelo.
<table border="1" cellspacing="0" style="font-family:Calibri,Arial; font-size:11pt; background-color:#ffffff; "> <colgroup><col style="font-weight:bold; width:30px; " /><col style="width:76.04px;" /><col style="width:76.04px;" /><col style="width:76.04px;" /><col style="width:76.04px;" /><col style="width:76.04px;" /><col style="width:25.66px;" /><col style="width:76.04px;" /><col style="width:76.04px;" /><col style="width:78.89px;" /></colgroup><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td > </td><td >A</td><td >B</td><td >C</td><td >D</td><td >E</td><td >F</td><td >G</td><td >H</td><td >I</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >1</td><td style="font-weight:bold; text-align:center; ">NAME</td><td style="font-weight:bold; text-align:center; ">COL B</td><td style="font-weight:bold; text-align:center; ">COL C</td><td style="font-weight:bold; text-align:center; ">COL D</td><td style="font-weight:bold; text-align:center; ">COL E</td><td style="font-weight:bold; "> </td><td style="font-weight:bold; text-align:center; ">NAME</td><td style="font-weight:bold; text-align:center; ">COL</td><td style="font-weight:bold; text-align:center; ">RESULT</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >2</td><td >a</td><td style="text-align:right; ">1</td><td style="background-color:#00b0f0; text-align:right; ">41</td><td style="text-align:right; ">86</td><td style="text-align:right; ">100</td><td > </td><td >b</td><td >COL D</td><td style="background-color:#ffff00; text-align:right; ">177</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >3</td><td >a</td><td style="text-align:right; ">2</td><td style="background-color:#00b0f0; text-align:right; ">42</td><td style="text-align:right; ">87</td><td style="text-align:right; ">101</td><td > </td><td >c</td><td >COL E</td><td style="background-color:#92d050; text-align:right; ">209</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >4</td><td >b</td><td style="background-color:#ffc000; text-align:right; ">3</td><td style="text-align:right; ">43</td><td style="background-color:#ffff00; text-align:right; ">88</td><td style="text-align:right; ">102</td><td > </td><td >a</td><td >COL C</td><td style="background-color:#00b0f0; text-align:right; ">83</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >5</td><td >b</td><td style="background-color:#ffc000; text-align:right; ">4</td><td style="text-align:right; ">44</td><td style="background-color:#ffff00; text-align:right; ">89</td><td style="text-align:right; ">103</td><td > </td><td >b</td><td >COL B</td><td style="background-color:#ffc000; text-align:right; ">7</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >6</td><td >c</td><td style="text-align:right; ">5</td><td style="background-color:#b2a1c7; text-align:right; ">45</td><td style="text-align:right; ">90</td><td style="background-color:#92d050; text-align:right; ">104</td><td > </td><td >c</td><td >COL C</td><td style="background-color:#b2a1c7; text-align:right; ">91</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >7</td><td >c</td><td style="text-align:right; ">6</td><td style="background-color:#b2a1c7; text-align:right; ">46</td><td style="text-align:right; ">91</td><td style="background-color:#92d050; text-align:right; ">105</td><td > </td><td > </td><td > </td><td > </td></tr></table><br /><table style="font-family:Arial; font-size:10pt; border-style: groove ;border-color:#00ff00;background-color:#fffcf9; color:#000000; "><tr><td ><b></b></td></tr><tr><td ><table border = "1" cellspacing="0" cellpadding="2" style="font-family:Arial; font-size:9pt;"><tr style="background-color:#cacaca; font-size:10pt;"><td >Cell</td><td >Formula</td></tr><tr><td >I2</td><td >=SUMPRODUCT((A2:A7=G2)*(B1:E1=H2)*(B2:E7))</td></tr><tr><td >I3</td><td >=SUMIF(A2:A7,G3,OFFSET(A2:A7,,MATCH(H3,B1:E1,0)))</td></tr><tr><td >I4</td><td >=SUMIF(A$2:A$7,G4,INDEX(B$2:E$7,0,MATCH(H4,B$1:E$1,0)))</td></tr><tr><td >I5</td><td >{=SUM(IF(A2:A7=G5,IF(B1:E1=H5,B2:E7)))}</td></tr><tr><td >I6</td><td >=SUMPRODUCT((A2:A7=G6)*(COLUMN(B1:E1)=MATCH(H6,A1:E1,0))*(B2:E7))</td></tr></table></td></tr></table>
Note:
The formula in I5 is an array formula.
Array formulas
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself