Using Excel sumifs to sum matrix elements

danas.zuokas picture danas.zuokas · May 14, 2012 · Viewed 23k times · Source

Is it possible using Excel's sumifs to find the sum of elements of a matrix using condition on row and column? For example matrix:

    c   d   e
a   1   2   3
b   4   5   6

I would like to sum elements of b row, d and e columns. The solution should work also for large dimension matrix. Sorry for ugly formatting.

Answer

lori_m picture lori_m · May 14, 2012

Maybe this formula could be extended to your needs: (data in A1:D3)

=SUMPRODUCT(--ISNUMBER(MATCH(B1:D1,{"d","e"},0)*MATCH(A2:A3,{"b"},0)),B2:D3)