I have a list off transactions with the date in column B and total amount for the transaction in column I. I want to have a cell that contains sum total of all transactions in the month of June of year 2011. However, the dates in column B may not be all in June, so I need to filter months that are June and then add all the values for each transaction of that month.
My thinking, =IF(DATE(2011,06,*),SUM(VLOOKUP(.....), Null))
, =SUM(IF(B=Date(2011,06,*))
Can you help me out please?
Thank you
You can use SUMPRODUCT like this
=SUMPRODUCT((TEXT(B3:B63,"mmm-yyyy")="jun-2011")+0,I3:I63)…or if you have Excel 2007 or later SUMIFS is probably preferable
=SUMIFS(I3:I63,B3:B63,">="&DATE(2011,6,1),B3:B63,"<"&DATE(2011,7,1))or with first of relevant month in a cell, e.g. A1 you can make that more flexible
=SUMIFS(I3:I63,B3:B63,">="&A1,B3:B63,"<"&EOMONTH(A1,0)+1)