Addition for two dimensional Excel

59 views Asked by At

I needed some help with conditional addition in Excel.

This is an example data:

    A      B        C            D
1 Animal January February      March 
2 Cat      5       6             7 
3 Cat      2       3             5 
4 Dog      1       4             8 

How can I write SUMIF on the conditions on, add total cats for the month of March?

I have been trying to experiment with SUMIF and written something like:

=SUMIF(A:A,Cat,D:D)

This is only going to work on one dimensional, meaning colum. How do I write a formula to calculate the sum of total cats in March? Column+ March , two dimensional.

1

There are 1 answers

0
Paul Wu On

You may try this:

=SUMIF(A1:A4;"Cat";INDEX(B1:D4; 0; 3))

The value of 3 in INDEX function means the third column (March), you may change it into 2 for February, and change it into 1 for January