Help on the Sumif Function

M

matt_writer

I have a budget table where I input data every week. I want to creat
another table that shows how much I've spent every month. So for th
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 thi
function work to where I can find the sum sorted by the month
 
J

joeu2004

matt_writer said:
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])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top