I’m using Excel 2010, which includes the SUMIFS function. My spreadsheet is in this format:
A B C
Date Amount Category
01/01/2013 $20.00 CatA
01/12/2013 $35.67 CatB
02/04/2013 $16.98 CatA
etc. In another part of the spreadsheet, I have these cells:
X Y
1 CatA_header
2 Jan-13 formula...
3 Feb-13
4 Mar-13
I’d like to place a formula in the cell specified by formula... (in cell Y2) that sums column B for the given category and the given year/month combination. I thought SUMIFS was right for the task, so I tried this formula:
=SUMIFS(B:B, A:A, AND(MONTH(A:A)=MONTH(X2), YEAR(A:A)=YEAR(X2)), C:C, "="&Y1)
However, this returns 0, even though it should return 20 in my contrived example. How can I use the SUMIFS function to perform this task?
Your row numbers seem to be off by 1, e.g.,
Y0. Also, you can’t filter the criteria range like that, I don’t think. Here’s a SUMPRODUCT that works on rows 2 to 10: