Sumif using criteria and dates

stugi

New Member
Joined
May 1, 2007
Messages
32
Morning all,

I've found the posts regarding using date ranges in sumif formulas but I need to take it a stage futher.

I've got a summary sheet of depots and I want to report "total spend" so far but also identify spend for the "currnet" financial period.

the depot number is my criteria for "total" spend but how do I isolate the curent period spend?
Each spend transaction will ahve the depot number in col A, description in col B, the transaction date in col C and the value in col D.
I have a table which has the start and end date for each financial period and an input cell on the sumamry sheet to denote which period is the "current" one

cheers
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Hi,

Sample data...


Excel Workbook
ABCD
1ID NumberNameDatesAmount
2AA10000Bart Simpson01/01/20111,000
3AA10001Lisa Simpson02/01/20111,000
4AA10002Bart Simpson03/01/20111,000
5AA10000Lisa Simpson01/02/20112,000
6AA10001Marge Simpson02/02/20112,000
7AA10002Maggie Simpson01/03/20113,000
8AA10002Bart Simpson01/04/20114,000
9AA10001Bart Simpson02/04/20114,000
10AA10002Lisa Simpson03/04/20114,000
11AA10003Homer Simpson01/05/20115,000
12AA10000Bart Simpson01/05/20115,000
13AA10001Bart Simpson01/06/20116,000
14AA10002Lisa Simpson01/06/20116,000
15AA10000Bart Simpson04/07/20117,000
16AA10001Lisa Simpson05/07/20117,000
17AA10000Homer Simpson06/08/20118,000
18AA10001Maggie Simpson02/08/20118,000
19AA10002Homer Simpson09/09/20119,000
20AA10001Lisa Simpson01/09/20119,000
Sheet1


This is summing up the dates based upon the period entered into A2....


Excel Workbook
ABCDEFGHI
1PeriodStart DateEnd DateTotalTotal*PeriodStart DateEnd Date
2101/01/201131/03/201110,00010,000*101/01/201131/03/2011
3******201/04/201130/06/2011
4******301/07/201130/09/2011
5******401/10/201131/12/2011
Sheet2


This is summing up the same date range based upon A2 as well as the name entered into D2...


Excel Workbook
ABCDEFGHIJ
1PeriodStart DateEnd DateNameTotalTotal*PeriodStart DateEnd Date
2101/01/201131/03/2011Bart Simpson2,0002,000*101/01/201131/03/2011
3*******201/04/201130/06/2011
4*******301/07/201130/09/2011
5*******401/10/201131/12/2011
Sheet2



The Sumproduct formula is for ALL versions of Excel.
The Sumifs formula is for 2007-2010 ONLY.

I hope that helps.

Ak
 
Upvote 0
Sounds like a sumproduct to me.

Column A=DepotNum
Column C=TransDate
Column D=Value

Depot Choice is what depot you want to look up. You may want to make a table with the choices and place this formula next to each one of those choices.

=SUMPRODUCT((TransValue)*((TransDate)>=startfinperiod)*((TransDate)<=endfinperiod)*((DepotNum)=DepotChoice))

Hope this makes sense.
 
Upvote 0

Forum statistics

Threads
1,224,598
Messages
6,179,822
Members
452,946
Latest member
JoseDavid

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