Calculate items sold within 10 days prior to specified date

joeltes

New Member
Joined
Mar 16, 2018
Messages
21
Hi all,

I have a list of sale line items, one column has a date, the other the number of items sold. How can I sum number of items sold, where order date is <2/12/18 and >2/02/18 but instead of inputting the date, I would select a cell containing 2/12/18 (i.e E3) and tell the formula to look for 10 days prior to E3?
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
joeltes, Good afternoon.

Suppose:
A1 --> Date to be checked
E3 --> 02/12/2018

Try to use:

...AND(A1>E3-10, A1<E3)...

Is that what you want?

I hope it helps.
 
Upvote 0
Hi,

You said <2/12/18 and >2/02/18, that's Only 9 days, the following formula assumes you want 10 days Prior to date in E3 (2/12/18), so from 2/2/18 to 2/11/18 inclusive:


Book1
ABCDE
1DateItems SoldTotal Sold 10 days Prior to E3
22/1/201820590
32/2/2018302/12/2018
42/3/201840
51/15/201850
62/5/201860
72/6/201870
82/7/201880
92/8/201890
102/9/2018100
112/20/2018110
122/11/2018120
133/14/2018130
Sheet25
Cell Formulas
RangeFormula
C2=SUMIFS(B2:B13,A2:A13,">="&E3-10,A2:A13,"<"&E3)
 
Upvote 0
You're welcome, welcome to the forum.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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