monthly totals

nategast

New Member
Joined
Jul 14, 2010
Messages
2
This one might be easy for you guys, but i've been having trouble, i'm fairly new to excel. My data looks like this: fairly random entries

date ______ name ___ cost
5/7/2010 __ girl1 ____ $510.00
5/12/2010 _ guy2 ____ $1,469.00
5/3/2010 __ guy1 ____ $433.50
3/29/2010 _ guy1 ____ $433.50
5/7/2010 __ guy2 ____ $229.50
4/6/2010 __ guy3 ____ $1,490.00
5/7/2010 __ girl2 ____ $127.50
5/7/2010 __ girl2 ____ $1,606.50


and i want, somewhere else in the document, to be able to post totals for different conditions from the list. like these:

monthly total --or-- name total
mar $ - - - - - - - - -guy1 $
apr $ - - - - - - - - - girl2 $
may $

I have used formulas with VLOOKUP and DSUM, among others, but I'm having trouble getting the coding right. Any help or a link to help would be great. Thanks
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Try the Sumproduct function, for example using what you posted,

=SUMPRODUCT((MONTH($A$2:$A$17)=5)*($B$2:$B$17="guy2")*($C$2:$C$17))

would return the total for guy2 in April (month = 5)
 
Upvote 0
You are going to love sumproduct. With your dates in column A, names in column B, and Cost in column C, assume your data runs from row 2 to row 20.

Cell E2 a user puts a date.
Cell E3 a user puts a name.

Cell E4 = Sumproduct((A2:A20=C2)*(B2:B20=C3)*(C2:C20))

This is good for one specfic date. A little more flexibility

Cell E2 a user puts a start date
Cell E3 a user puts an end date
Cell E4 a user puts a name

Cell E5 = Sumproduct((A2:A20>=E2)*(A2:A20<=E3)*(B2:B20=C3)*(C2:C20)

Study the sumproduct formula, you'll love it. Hope this works.

Jeff
 
Upvote 0

Forum statistics

Threads
1,215,444
Messages
6,124,892
Members
449,194
Latest member
JayEggleton

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