Loan,
Your formula was trying to compare a date/time serial number (3/23/05 is
38434) with a number like 1 through 12 (as returned by MONTH function). In
such a case, SUMIF should return 0.
If A1:A10 contain date/time serial numbers, you can add up the values in
column B for a given month with formulas like:
=SUMIF(A1:A10,"=" & DATEVALUE("1/1/05"),B1:B10)-SUMIF(A1:A10,"" &
DATEVALUE("1/31/05"),B1:B10) same month and year
=SUMPRODUCT((MONTH(A1:A10)=MONTH(A10))*B1:B10) same month, maybe not
same year
=SUMPRODUCT((MONTH(A1:A10)=MONTH(A10))*(YEAR(A1:A1 0)=YEAR(A10))*B1:B10)
same month and year
You'll need to format the results as a number, because Excel thinks you
intend it to be a date.
You can get the sum of values in column B for column A equalling the end of
a given month with:
=SUMIF(A1:A10,EOMONTH(A1,0),B1:B10)
|