Goal: Make a fully dynamic SUMIF array formula in Excel. Sample sheet:
Cells C10, D10, and C11 will change, and the formula will need to still work. For example, if C10 became ID and C11 became 171, The formula should sum all weights where the ID column row equaled 171.
You mentioned that D10 will change as well as C10 and C11 but your sample data gives no indication as to what column of information to make a sum from. I've adjusted your sample data to suit.
=$B$1:$C$1
.=$D$1:$E$1
.=INDEX($B$2:$C$7, 0, MATCH($C$10, $B$1:$C$1, 0))
. =SUMIFS(INDEX($D$2:$E$7, 0, MATCH($D$10, $D1:$E1, 0)), INDEX($B$2:$C$7, 0, MATCH($C$10, $B$1:$C$1, 0)), $C$11)
You should now have three drop-downs in C10:C11, D10 and a dynamic SUMIFS function total based on the criteria you select.