View Single Post
  #3   Report Post  
Harlan Grove
 
Posts: n/a
Default

Leo Heuser wrote...
....
In C2:

=B2+SUMPRODUCT(MMULT((A2=$E$2:$E$8)*($F$2:$F$8=TR ANSPOSE($H$2:$H$7)),$I$2:$I$7))

....

Since your formula needs to be entered as an array formula, you could
shorten it by replacing SUMPRODUCT with SUM. There's an alternative
formula that doesn't require array entry.

=B2+SUMPRODUCT(SUMIF($H$2:$H$7,LEFT(F$2:F$8,LEN(F$ 2:F$8)*(E$2:E$8=A2)),I$2:I$7))

This could be shortened as an array formula to

=B2+SUM(SUMIF($H$2:$H$7,IF(E$2:E$8=A2,F$2:F$8),I$2 :I$7))

That said, conditional sums using multiple many-to-one relationships is
one thing databases do much better than spreadsheets.