SUMIF with 2 criteria

elevenaminla

New Member
Joined
Jan 13, 2011
Messages
28
hey guys...

From a data table I've created, I'm trying to summarize expenses MONTHLY based on:

a - CATEGORY
b - DATE

I currently have DATE, EXPENSE, CATEGORY as column headers. DATE is in actual date (e.g. 03/05/11), expense is number (e.g. $5,000), category is textual (e.g. Marketing).

What I want to do is SUM by category and by date (e.g. sum all Marketing expenses in March 2011).

I tried a Pivot Table but I can't figure out how to just show March 2011 as a header labels instead of actual dates (03/05/11, 03/06/11, etc).

Any thoughts?

Thank you!
 
Aladin, I don't know what I'm doing wrong in regards to F2. I have the date entered 12/1/2010... have tried 1/12/2010. Not sure what is wrong.

The formatting is set to Date in "Format Cells" options

In F2 enter:

1-Dec-11

In F1 enter:

=ISNUMBER(F2)

If you see TRUE appear in F1, we can assume that you have succeeded
to have a first day date in F2, which is December 1st, 2011.

Otherwise try:

=SUMIFS($J$15:$J$100,$F$15:$F$100,">="&DATE(2011,12,1),$F$15:$F$100,"<="&EOMONTH(DATE(2011,12,1),0),$K$15:$K$100,$D3)

This should give you a total for Dec-11 regarding the value in D3.
 
Upvote 0

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Aladin, I created a sheet from scratch and the formula worked! Have no idea why it wasn't working originally, but I'll play with it or rebuild data.

Thank you once again so so much!!!
 
Upvote 0
Sorry actually the dates in the table are not numbers! When I ran the ISNUMBER I'm getting FALSE.

I tried to change the cell format, but they aren't changing format.
 
Upvote 0
If you are still interested in utilizing pivot table, right click on the date field, select group and then MONTH, your header will show the whole month consolidated by category


Excel Workbook
ABC
1DateExpenseCategory
23/10/2011500Marketing
33/4/2011230Sales
43/15/2011450Finance
53/2/20111000Finance
63/18/20111200Admin
7
8
9Sum of ExpenseDate
10CategoryMarGrand Total
11Admin12001200
12Finance14501450
13Marketing500500
14Sales230230
15Grand Total33803380
Sheet3

Just a suggestion,
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,297
Members
452,903
Latest member
Knuddeluff

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