=SUM(IF($AA$6:$AA$106=S115,IF($Z$6:$Z$106=T115,$X$6:$X$106,0),0)) in X115 and
=SUM(IF($AA$6:$AA$106=S115,IF($Z$6:$Z$106=T115,$Y$6:$Y$106,0),0)) in Y115
and copied down will get you desired results.
However above are array formulas so remember to press Ctrl + Enter in place of Enter, after you type/ copy the formula in the cell.
Ritesh.