Help on the Sumif Function
"matt_writer" wrote
I have a budget table where I input data every week.
I want to create another table that shows how much I've
spent every month. So for the Month of April my equation
looks like SUMIF(Table[Date], MONTH(4), Table[Debit]).
My value comes up as zero. Is there a way to make this
function work to where I can find the sum sorted by the month?
The parameter to MONTH should be a date. So MONTH(4) is effectively
MONTH("4 Jan 1900") (not valid Excel syntax), which should always return 1.
But Table[Date] presumably contains complete dates. So value of 1 that
MONTH(4) returns is interpreted as 1 Jan 1900 because you are comparing it
with dates.
What you might want to write is: SUMIF(MONTH(Table[Date])),4,Table[Debit]).
But that is not valid syntax.
Use the following instead:
SUMPRODUCT((MONTH(Table[Date])=4)*Table[Debit])
|