Ak sú tie oblasti vždy súvislé tak potom môžete aj takto, do E31 zadajte toto, a nakopírujte doprava:
=SUM(OFFSET($E$5;MATCH(E$29;$C$5:$C$23;0)-1;MATCH(E$28;$E$2:$Z$2;0)-1;COUNTIF($C$5:$C$23;E$29);COUNTIF($E$2:$Z$2;E$28)))
=SUMA(POSUN($E$5;POZVYHLEDAT(E$29;$C$5:$C$23;0)-1;POZVYHLEDAT(E$28;$E$2:$Z$2;0)-1;COUNTIF($C$5:$C$23;E$29);COUNTIF($E$2:$Z$2;E$28)))
EDIT:
A napr takto (maticový vzorec), to zráta aj ak nebudú súvislé :
=SUMPRODUCT((ROW($E$5:$Z$23)=IF($C$5:$C$23=E$29;ROW($C$5:$C$23)))*(COLUMN($E$5:$Z$23)=IF($E$2:$Z$2=E$28;COLUMN($E$2:$Z$2)));$E$5:$Z$23)
=SOUČIN.SKALÁRNÍ((ŘÁDEK($E$5:$Z$23)=KDYŽ($C$5:$C$23=E$29;ŘÁDEK($C$5:$C$23)))*(SLOUPEC($E$5:$Z$23)=KDYŽ($E$2:$Z$2=E$28;SLOUPEC($E$2:$Z$2)));$E$5:$Z$23)citovat
=SUM(OFFSET($E$5;MATCH(E$29;$C$5:$C$23;0)-1;MATCH(E$28;$E$2:$Z$2;0)-1;COUNTIF($C$5:$C$23;E$29);COUNTIF($E$2:$Z$2;E$28)))
=SUMA(POSUN($E$5;POZVYHLEDAT(E$29;$C$5:$C$23;0)-1;POZVYHLEDAT(E$28;$E$2:$Z$2;0)-1;COUNTIF($C$5:$C$23;E$29);COUNTIF($E$2:$Z$2;E$28)))
EDIT:
A napr takto (maticový vzorec), to zráta aj ak nebudú súvislé :
=SUMPRODUCT((ROW($E$5:$Z$23)=IF($C$5:$C$23=E$29;ROW($C$5:$C$23)))*(COLUMN($E$5:$Z$23)=IF($E$2:$Z$2=E$28;COLUMN($E$2:$Z$2)));$E$5:$Z$23)
=SOUČIN.SKALÁRNÍ((ŘÁDEK($E$5:$Z$23)=KDYŽ($C$5:$C$23=E$29;ŘÁDEK($C$5:$C$23)))*(SLOUPEC($E$5:$Z$23)=KDYŽ($E$2:$Z$2=E$28;SLOUPEC($E$2:$Z$2)));$E$5:$Z$23)citovat