Formula Help - SUMPRODUCT/SUMIF (I think?)

bighiller

New Member
Joined
May 19, 2010
Messages
3
I'm trying to create my own expense/budget spreadsheet, but I'm having trouble with a formula, as I'm not expert.

So, basically I have one sheet where I input my expenses. In that sheet are columns date, total, category

The date is in the format dd/mm/yy
The total is currency, two-digit
the category is a drop-down list that I have made.

On another sheet I have my budget which tracks the expenses against the budget. What I want is to be able to enter the expense, date and category and the total amount of that category, for that month to be automatically added and entered into the budget sheet.

Currently I have this formula, which gives me the totals for the category, but doesn't use the second criteria I want, the date. I could make a seperate sheet for each month, but I think having two criteria (date and category) is cleaner.

Here is an example:

=SUMIF(INDIRECT("Spending!G2:G1000"),"Dining Out",INDIRECT("Spending!D2:D1000"))

So as you can tell, the "expense sheet" is called Spending
The column containing the dates is A
The column containing the expense is D
The column containing the category is G

From what I've read, it's hard (if not impossible?) to use two criteria with the SUMIF function. I understand the SUMPRODUCT is what I should be using but I can't for the life of me get the syntax correct...

Anyone able to help a function-illiterate guy out?
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Not sure why you're using INDIRECT. Something like the below should work:

Code:
=SUMPRODUCT(--(Spending!G2:G1000="Dining Out"),--(MONTH(Spending!A2:A1000)=Month(A1)),--(YEAR(Spending!A2:A1000)=Year(A1))(Spending!D2:D1000))
(change the reference to A1 to the cell containing your date)

EDIT: PS Welcome to the Board!
 
Upvote 0
Not sure why you're using INDIRECT. Something like the below should work:

Code:
=SUMPRODUCT(--(Spending!G2:G1000="Dining Out"),--(MONTH(Spending!A2:A1000)=Month(A1)),--(YEAR(Spending!A2:A1000)=Year(A1))(Spending!D2:D1000))
(change the reference to A1 to the cell containing your date)

EDIT: PS Welcome to the Board!

Thanks!!

How would I tell the formula to only sum up the totals for the month of May? (i.e */5/10)
 
Upvote 0
Enter 01/05/10 into A1 (or whichever cell contains the your date). Alternatively, change "MONTH(A1)" to "5" and "YEAR(A1)" to "2010"
 
Upvote 0

Forum statistics

Threads
1,214,875
Messages
6,122,042
Members
449,063
Latest member
ak94

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top