sumifs with date range

bozzy71

New Member
Joined
Mar 4, 2013
Messages
38
Office Version
  1. 365
Hi,

I have a table with date ranges (UK format) in cells f5:h5 (i.e. f5 is 3/1/17-30/4/17, g5 is 1/5/17-31/7/17, h5 is15/10/17-30/11/17). I have associated costs in cells f6:h6. I have an offer that is only valid 11/3/17-31/10/17 which gives 20% off the prices f6:h6. how can i get the calculation to only look between these dates, sum the figures and apply the 20% discount?

I hope this makes sense!

Thanks
James
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
What are the date criteria and the expected value?

Thanks. Doing this has produced an answer of zero. Obviously I can't seem to get it to sum the relevant costs and apply the 20% discount? Table now looks like this:

[TABLE="width: 1253"]
<tbody>[TR]
[TD]Column1[/TD]
[TD]12/12/2016[/TD]
[TD]18/12/2016[/TD]
[TD]19/12/16[/TD]
[TD]02/01/17[/TD]
[TD]11/01/17[/TD]
[TD]30/04/2017[/TD]
[TD]01/05/2017[/TD]
[TD]31/07/2017[/TD]
[TD]15/10/2017[/TD]
[TD]30/11/2017[/TD]
[/TR]
[TR]
[TD]Cobblers GS[/TD]
[TD="align: right"]$772.00[/TD]
[TD="align: right"]$772.00[/TD]
[TD="align: right"]$892.00[/TD]
[TD="align: right"]$892.00[/TD]
[TD="align: right"]$772.00[/TD]
[TD="align: right"]$772.00[/TD]
[TD="align: right"]$476.00[/TD]
[TD="align: right"]$476.00[/TD]
[TD="align: right"]$516.00[/TD]
[TD="align: right"]$516.00[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
where the dates when the 20% discount are applicable I would like it to sum the the amounts that are within the date bands. i.e the offer is between 11/3/17 and 31/oct/17. Therefore I'd like it to sum each amount reflected in the price bands below the relevant dates. I'm not sure if splitting the date ranges to separate cells is helping at all? I would expect the range 11/01/17-30/04/2017 to reflect one amount of $772, the same for 1/5/17-31/07/17 one amount of $476 etc. The total before discount would be $1764-20%=1411.20. Not sure if I'm over-complicating this? I have seen some sort of example (which i can't get my head around!) which may work? thanks


[FONT=&quot]
sum%20if%20date%20is%20between.png


[/FONT]

[FONT=&quot]=SUMIFS(amount,start_date,">"&A1,end_date,"<"&B1)


[/FONT]
 
Upvote 0

Excel 2010
CDEFGHI
4
511-Mar-1731-Jan-1730-Apr-1731-Jul-1731-Oct-1731-Jan-18
631-Oct-179001,0001,2001,4001,500
73,600
8720Discount
9or
10720Discount
11
12
131-Sep-151,50015-Sep-15
146-Sep-156,50015-Oct-15
1521-Sep-151,25018,250
1622-Sep-1512,000
176-Oct-155,000
1815-Oct-155,000
1929-Oct-151,000
4b
Cell Formulas
RangeFormula
C7=SUMIFS(E6:I6,E5:I5,"<="&C6,E5:I5,">"&C5)
C8=C7*0.2
C10=SUMIFS(E6:I6,E5:I5,"<="&DATE(2017,10,31),E5:I5,">"&DATE(2017,3,11))*0.2+N("Discount is .2 (20%)")
H15=SUMIFS(D13:D19,C13:C19,"<"&H14,C13:C19,">"&H13)


I posted this in case the question was not resolved.
I edited some of the information to provide the example.
 
Upvote 0
Thanks for this. Think nearly there but it is only returning a result of zero rather than the 3600 in C7?
 
Upvote 0
Apologies, my error in the copying. Thanks for this - I think I'm starting to understand (eventually) how the formula works. Thank you all for your assistance and patience!:)
 
Upvote 0

Forum statistics

Threads
1,224,310
Messages
6,177,796
Members
452,806
Latest member
Workerl3ee

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