Help with complicated situation

ggd49404

New Member
Joined
Oct 12, 2015
Messages
1
Good morning! I'm currently looking for help on a problem I've been facing in Excel. I'm trying to process a massive amount of data. To be specific, I'm referencing 17,352,100 rows. Fortunately, I don't plan on processing or working with all of them at once. I'm running sales data for different items. Each item has a daily sales amount. This means each item gets 365 rows just to itself. I'm looking to calculate everything down to thirteen four-week periods. I'm looking for a formula (or other solution) that will look at each item, pick out the four weeks worth of dates, and total the sales amounts for each day.

My plan is to set something up so that I can process about 500 items at a time, copy/paste the results, wash, rinse, and repeat. This will also be something that in the future, I can hopefully just alter the dates and use again. I can only think of formulas that are too long to create. Any help anyone can offer would be great.

Below, I have copied a sample of two codes. I need to break down the sales days into four week intervals. The first interval would be 10/08/14 to 11/07/14. If you have any questions or need any additional clarification, please let me know.

Code
Sales DayDollarsUnits
110/8/2014$363.00121.00
110/9/2014$312.00104.00
110/10/2014$360.00120.00
110/11/2014$453.00151.00
110/12/2014$585.00195.00
110/13/2014$411.00137.00
110/14/2014$462.00154.00
110/15/2014$375.00125.00
110/16/2014$288.0096.00
110/17/2014$369.00123.00
110/18/2014$456.00152.00
110/19/2014$621.00207.00
110/20/2014$414.00138.00
110/21/2014$390.00130.00
110/22/2014$276.0092.00
110/23/2014$324.00108.00
110/24/2014$330.00110.00
110/25/2014$408.00136.00
110/26/2014$645.00215.00
110/27/2014$453.00151.00
110/28/2014$336.00112.00
110/29/2014$312.00104.00
110/30/2014$288.0096.00
110/31/2014$339.00113.00
111/1/2014$447.00149.00
111/2/2014$588.00196.00
111/3/2014$405.00135.00
111/4/2014$372.00124.00
111/5/2014$306.00102.00
111/6/2014$321.00107.00
111/7/2014$345.00115.00
111/8/2014$396.00132.00
111/9/2014$788.00315.00
111/10/2014$500.50200.00
111/11/2014$413.00164.00
111/12/2014$489.00195.00
111/13/2014$443.00177.00
111/14/2014$413.50165.00
111/15/2014$514.00205.00
111/16/2014$708.00236.00
111/17/2014$498.00166.00
111/18/2014$357.00119.00
111/19/2014$324.00108.00
111/20/2014$378.00126.00
111/21/2014$420.00140.00
111/22/2014$498.00166.00
111/23/2014$612.00204.00
111/24/2014$474.00158.00
111/25/2014$527.25176.00
111/26/2014$300.00100.00
111/27/2014$33.0011.00
111/28/2014$294.0098.00
111/29/2014$357.00119.00
111/30/2014$576.00192.00
112/1/2014$429.00143.00
112/2/2014$369.00123.00
112/3/2014$366.00122.00
112/4/2014$273.0091.00
112/5/2014$441.00147.00
112/6/2014$489.00163.00
112/7/2014$600.00200.00
112/8/2014$591.00197.00
112/9/2014$378.00126.00
112/10/2014$363.00121.00
112/11/2014$360.00120.00
112/12/2014$408.00136.00
112/13/2014$429.00143.00
112/14/2014$792.00264.00
112/15/2014$354.00118.00
112/16/2014$282.0094.00
112/17/2014$315.00105.00
112/18/2014$357.00119.00
112/19/2014$351.00117.00
112/20/2014$351.00117.00
112/21/2014$630.00210.00
112/22/2014$357.00119.00
112/23/2014$363.00121.00
112/24/2014$393.00131.00
112/26/2014$294.0098.00
112/27/2014$387.00129.00
112/28/2014$474.00158.00
112/29/2014$420.00140.00
112/30/2014$348.00116.00
112/31/2014$384.00128.00
11/1/2015$186.0062.00
11/2/2015$414.00138.00
11/3/2015$423.00141.00
11/4/2015$681.00227.00
11/5/2015$429.00143.00
11/6/2015$282.0094.00
11/7/2015$342.00114.00
11/8/2015$420.00140.00
11/9/2015$426.00142.00
11/10/2015$573.00191.00
11/11/2015$789.00263.00
11/12/2015$366.00122.00
11/13/2015$276.0092.00
11/14/2015$321.00107.00
11/15/2015$375.00125.00
11/16/2015$357.00119.00
11/17/2015$408.00136.00
11/18/2015$573.00191.00
11/19/2015$474.00158.00
11/20/2015$393.00131.00
11/21/2015$243.0081.00
11/22/2015$279.0093.00
11/23/2015$567.00189.00
11/24/2015$363.00121.00
11/25/2015$777.00259.00
11/26/2015$213.0071.00
11/27/2015$267.0089.00
11/28/2015$285.0095.00
11/29/2015$312.00104.00
11/30/2015$360.00120.00
11/31/2015$642.00214.00
12/1/2015$612.00204.00
12/2/2015$285.0095.00
12/3/2015$324.00108.00
12/4/2015$291.0097.00
12/5/2015$366.00122.00
12/6/2015$405.00135.00
12/7/2015$384.00128.00
12/8/2015$648.00216.00
12/9/2015$414.00138.00
12/10/2015$333.00111.00
12/11/2015$324.00108.00
12/12/2015$351.00117.00
12/13/2015$351.00117.00
12/14/2015$393.00131.00
12/15/2015$417.00139.00
12/16/2015$534.00178.00
12/17/2015$270.0090.00
12/18/2015$327.00109.00
12/19/2015$288.0096.00
12/20/2015$441.00147.00
12/21/2015$621.00207.00
12/22/2015$537.00179.00
12/23/2015$420.00140.00
12/24/2015$297.0099.00
12/25/2015$303.00101.00
12/26/2015$321.00107.00
12/27/2015$336.00112.00
12/28/2015$519.00173.00
13/1/2015$683.00228.00
13/2/2015$498.00166.00
13/3/2015$441.00147.00
13/4/2015$519.00173.00
13/5/2015$219.0073.00
13/6/2015$366.00122.00
13/7/2015$423.00141.00
13/8/2015$720.00240.00
13/9/2015$438.00146.00
13/10/2015$357.00119.00
13/11/2015$426.00142.00
13/12/2015$387.00129.00
13/13/2015$378.00126.00
13/14/2015$465.00155.00
13/15/2015$696.00232.00
13/16/2015$369.00123.00
13/17/2015$363.00121.00
13/18/2015$249.0083.00
13/19/2015$384.00128.00
13/20/2015$291.0097.00
13/21/2015$396.00132.00
13/22/2015$633.00211.00
13/23/2015$438.00146.00
13/24/2015$312.00104.00
13/25/2015$297.0099.00
13/26/2015$333.00111.00
13/27/2015$285.0095.00
13/28/2015$456.00152.00
13/29/2015$732.00244.00
13/30/2015$348.00116.00
13/31/2015$240.0080.00
14/1/2015$333.00111.00
14/2/2015$333.00111.00
14/3/2015$429.00143.00
14/4/2015$495.00165.00
14/5/2015$341.50136.00
14/6/2015$608.00243.00
14/7/2015$504.50202.00
14/8/2015$381.00152.00
14/9/2015$480.50192.00
14/10/2015$370.00148.00
14/11/2015$503.50201.00
14/12/2015$675.00225.00
14/13/2015$504.00168.00
14/14/2015$492.00164.00
14/15/2015$368.00123.00
14/16/2015$438.00146.00
14/17/2015$357.00119.00
14/18/2015$441.00147.00
14/19/2015$792.00264.00
14/20/2015$462.00154.00
14/21/2015$387.00129.00
14/22/2015$363.00121.00
14/23/2015$357.00119.00
14/24/2015$330.00110.00
14/25/2015$417.00139.00
14/26/2015$813.00271.00
14/27/2015$576.00192.00
14/28/2015$327.00109.00
14/29/2015$315.00105.00
14/30/2015$417.00139.00
15/1/2015$441.00147.00
15/2/2015$450.00150.00
15/3/2015$791.00264.00
15/4/2015$453.00151.00
15/5/2015$408.00136.00
15/6/2015$432.00144.00
15/7/2015$438.00146.00
15/8/2015$477.00159.00
15/9/2015$501.00167.00
15/10/2015$612.00204.00
15/11/2015$549.00183.00
15/12/2015$384.00128.00
15/13/2015$453.00151.00
15/14/2015$447.00149.00
15/15/2015$372.00124.00
15/16/2015$444.00148.00
15/17/2015$884.25295.00
15/18/2015$378.00126.00
15/19/2015$387.00129.00
15/20/2015$429.00143.00
15/21/2015$462.00154.00
15/22/2015$426.00142.00
15/23/2015$480.00160.00
15/24/2015$486.00162.00
15/25/2015$549.00183.00
15/26/2015$450.00150.00
15/27/2015$378.00126.00
15/28/2015$339.00113.00
15/29/2015$348.00116.00
15/30/2015$417.00139.00
15/31/2015$696.00232.00
16/1/2015$462.00154.00
16/2/2015$357.00119.00
16/3/2015$435.00145.00
16/4/2015$315.00105.00
16/5/2015$399.00133.00
16/6/2015$495.00165.00
16/7/2015$666.00222.00
16/8/2015$438.00146.00
16/9/2015$507.00169.00
16/10/2015$399.00133.00
16/11/2015$477.00159.00
16/12/2015$402.00134.00
16/13/2015$447.00149.00
16/14/2015$552.00184.00
16/15/2015$453.00151.00
16/16/2015$360.00120.00
16/17/2015$276.0092.00
16/18/2015$348.00116.00
16/19/2015$345.00115.00
16/20/2015$441.00147.00
16/21/2015$558.00186.00
16/22/2015$435.00145.00
16/23/2015$339.00113.00
16/24/2015$384.00128.00
16/25/2015$300.00100.00
16/26/2015$336.00112.00
16/27/2015$423.00141.00
16/28/2015$576.00192.00
16/29/2015$426.00142.00
16/30/2015$294.0098.00
17/1/2015$357.00119.00
17/2/2015$423.00141.00
17/3/2015$459.00153.00
17/4/2015$381.00127.00
17/5/2015$414.00138.00
17/6/2015$396.00132.00
17/7/2015$374.00125.00
17/8/2015$297.0099.00
17/9/2015$372.00124.00
17/10/2015$387.00129.00
17/11/2015$441.00147.00
17/12/2015$594.00198.00
17/13/2015$417.00139.00
17/14/2015$369.00123.00
17/15/2015$354.00118.00
17/16/2015$396.00132.00
17/17/2015$336.00112.00
17/18/2015$465.00155.00
17/19/2015$579.00193.00
17/20/2015$390.00130.00
17/21/2015$339.00113.00
17/22/2015$282.0094.00
17/23/2015$270.0090.00
17/24/2015$348.00116.00
17/25/2015$402.00134.00
17/26/2015$705.50282.00
17/27/2015$382.00152.00
17/28/2015$353.50141.00
17/29/2015$303.50121.00
17/30/2015$383.00153.00
17/31/2015$376.50150.00
18/1/2015$412.50165.00
18/2/2015$686.00274.00
18/3/2015$413.00165.00
18/4/2015$447.50179.00
18/5/2015$340.50136.00
18/6/2015$415.00166.00
18/7/2015$474.50189.00
18/8/2015$424.00169.00
18/9/2015$547.50183.00
18/10/2015$438.00146.00
18/11/2015$345.00115.00
18/12/2015$339.00113.00
18/13/2015$357.00119.00
18/14/2015$495.00165.00
18/15/2015$438.00146.00
18/16/2015$567.00189.00
18/17/2015$474.00158.00
18/18/2015$375.00125.00
18/19/2015$369.00123.00
18/20/2015$327.00109.00
18/21/2015$324.00108.00
18/22/2015$429.00143.00
18/23/2015$759.00253.00
18/24/2015$459.00153.00
18/25/2015$387.00129.00
18/26/2015$348.00116.00
18/27/2015$276.0092.00
18/28/2015$372.00124.00
18/29/2015$474.00158.00
18/30/2015$612.00204.00
18/31/2015$429.00143.00
19/1/2015$315.00105.00
19/2/2015$312.00104.00
19/3/2015$345.00115.00
19/4/2015$453.00151.00
19/5/2015$420.00140.00
19/6/2015$368.25123.00
19/7/2015$507.00169.00
19/8/2015$375.00125.00
19/9/2015$276.0092.00
19/10/2015$291.0097.00
19/11/2015$333.00111.00
19/12/2015$534.00178.00
19/13/2015$645.00215.00
19/14/2015$435.00145.00
19/15/2015$396.00132.00
19/16/2015$282.0094.00
19/17/2015$318.00106.00
19/18/2015$291.0097.00
19/19/2015$414.00138.00
19/20/2015$600.00200.00
19/21/2015$432.00144.00
19/22/2015$291.0097.00
19/23/2015$282.0094.00
19/24/2015$275.0092.00
19/25/2015$342.00114.00
19/26/2015$402.00134.00
19/27/2015$729.00243.00
19/28/2015$423.00141.00
19/29/2015$276.0092.00
19/30/2015$261.0087.00
110/1/2015$336.00112.00
110/2/2015$285.0095.00
110/3/2015$435.00145.00
110/4/2015$642.00214.00
110/5/2015$396.00132.00
110/6/2015$366.00122.00
110/7/2015$297.0099.00
110/8/2015$294.0098.00
210/8/2014$348.6892.00
210/9/2014$515.44136.00
210/10/2014$496.49131.00
210/11/2014$625.35165.00
210/12/2014$780.24206.00
210/13/2014$432.06114.00
210/14/2014$473.75125.00
210/15/2014$515.44136.00
210/16/2014$481.33127.00
210/17/2014$598.82158.00
210/18/2014$825.47218.00
210/19/2014$826.22218.00
210/20/2014$397.95105.00
210/21/2014$496.09131.00
210/22/2014$439.14116.00
210/23/2014$613.63162.00
210/24/2014$606.40160.00
210/25/2014$701.15185.00
210/26/2014$674.62178.00
210/27/2014$428.27113.00
210/28/2014$492.20130.00
210/29/2014$560.92148.00
210/30/2014$394.16104.00
210/31/2014$621.01164.00
211/1/2014$678.41179.00
211/2/2014$863.22228.00
211/3/2014$447.22118.00
211/4/2014$382.79101.00
211/5/2014$420.69111.00
211/6/2014$405.18107.00
211/7/2014$413.11109.00
211/8/2014$697.01184.00
211/9/2014$792.11209.00
211/10/2014$526.81139.00
211/11/2014$495.49131.00
211/12/2014$542.91144.00
211/13/2014$544.91144.00
211/14/2014$563.96149.00
211/15/2014$778.44206.00
211/16/2014$1,111.58370.00
211/17/2014$499.74165.00
211/18/2014$614.57203.00
211/19/2014$690.20229.00
211/20/2014$841.58280.00
211/21/2014$1,081.95360.00
211/22/2014$1,662.24553.00
211/23/2014$2,287.50760.00
211/24/2014$2,369.03788.00
211/25/2014$3,324.971,104.00
211/26/2014$2,723.16905.00
211/27/2014$1,013.69335.00
211/28/2014$567.79189.00
211/29/2014$684.16227.00
211/30/2014$583.11154.00
212/1/2014$606.40160.00
212/2/2014$439.64116.00
212/3/2014$466.17123.00
212/4/2014$541.97143.00
212/5/2014$643.35170.00
212/6/2014$814.85215.00
212/7/2014$765.08202.00
212/8/2014$688.73182.00
212/9/2014$572.29151.00
212/10/2014$480.83127.00
212/11/2014$605.90160.00
212/12/2014$738.55195.00
212/13/2014$924.76244.00
212/14/2014$897.33237.00
212/15/2014$648.09171.00
212/16/2014$678.41179.00
212/17/2014$697.36184.00
212/18/2014$811.06214.00
212/19/2014$1,071.67283.00
212/20/2014$1,586.96419.00
212/21/2014$1,909.31504.00
212/22/2014$2,417.67638.00
212/23/2014$3,732.60985.00
212/24/2014$3,956.011,044.00
212/26/2014$916.68242.00
212/27/2014$958.87253.00
212/28/2014$943.11249.00
212/29/2014$788.32208.00
212/30/2014$1,500.64396.00
212/31/2014$2,296.39606.00
21/1/2015$791.81209.00
21/2/2015$734.76194.00
21/3/2015$689.78182.00
21/4/2015$765.58202.00
21/5/2015$447.22118.00
21/6/2015$360.0595.00
21/7/2015$526.81139.00
21/8/2015$492.70130.00
21/9/2015$670.83177.00
21/10/2015$852.75225.00
21/11/2015$909.60240.00
21/12/2015$477.54126.00
21/13/2015$560.92148.00
21/14/2015$602.61159.00
21/15/2015$541.97143.00
21/16/2015$663.05175.00
21/17/2015$742.34196.00
21/18/2015$836.74221.00
21/19/2015$628.89166.00
21/20/2015$640.01169.00
21/21/2015$424.48112.00
21/22/2015$579.87153.00
21/23/2015$974.03257.00
21/24/2015$572.29151.00
21/25/2015$1,163.13307.00
21/26/2015$428.27113.00
21/27/2015$424.48112.00
21/28/2015$598.82158.00
21/29/2015$658.71174.00
21/30/2015$882.87233.00
21/31/2015$1,620.62428.00
22/1/2015$1,413.67373.00
22/2/2015$328.7387.00
22/3/2015$484.12128.00
22/4/2015$511.65135.00
22/5/2015$488.91129.00
22/6/2015$651.88172.00
22/7/2015$822.43217.00
22/8/2015$852.75225.00
22/9/2015$477.54126.00
22/10/2015$462.38122.00
22/11/2015$621.31164.00
22/12/2015$576.08152.00
22/13/2015$739.05195.00
22/14/2015$875.49231.00
22/15/2015$644.30170.00
22/16/2015$780.74206.00
22/17/2015$420.69111.00
22/18/2015$549.55145.00
22/19/2015$481.33127.00
22/20/2015$700.90185.00
22/21/2015$788.32208.00
22/22/2015$670.83177.00
22/23/2015$504.07133.00
22/24/2015$481.33127.00
22/25/2015$534.39141.00
22/26/2015$568.50150.00
22/27/2015$572.29151.00
22/28/2015$760.79201.00
23/1/2015$670.83177.00
23/2/2015$492.70130.00
23/3/2015$704.94186.00
23/4/2015$708.48187.00
23/5/2015$348.6892.00
23/6/2015$519.23137.00
23/7/2015$761.79201.00
23/8/2015$897.98237.00
23/9/2015$576.08152.00
23/10/2015$523.02138.00
23/11/2015$432.06114.00
23/12/2015$587.45155.00
23/13/2015$670.83177.00
23/14/2015$773.16204.00
23/15/2015$735.26194.00
23/16/2015$541.97143.00
23/17/2015$523.02138.00
23/18/2015$473.75125.00
23/19/2015$549.55145.00
23/20/2015$549.55145.00
23/21/2015$761.79201.00
23/22/2015$928.55245.00
23/23/2015$454.30120.00
23/24/2015$496.49131.00
23/25/2015$553.34146.00
23/26/2015$549.55145.00
23/27/2015$602.61159.00
23/28/2015$871.20230.00
23/29/2015$1,041.93317.00
23/30/2015$600.28182.00
23/31/2015$876.64266.00
24/1/2015$1,215.22368.00
24/2/2015$1,730.60525.00
24/3/2015$3,071.37933.00
24/4/2015$3,928.681,192.00
24/5/2015$1,771.72468.00
24/6/2015$617.77163.00
24/7/2015$515.44136.00
24/8/2015$576.08152.00
24/9/2015$613.43162.00
24/10/2015$613.98162.00
24/11/2015$845.17223.00
24/12/2015$761.09201.00
24/13/2015$602.36159.00
24/14/2015$670.83177.00
24/15/2015$564.71149.00
24/16/2015$576.08152.00
24/17/2015$718.10190.00
24/18/2015$768.87203.00
24/19/2015$905.31239.00
24/20/2015$632.18167.00
24/21/2015$523.02138.00
24/22/2015$503.57133.00
24/23/2015$564.71149.00
24/24/2015$586.50155.00
24/25/2015$598.82158.00
24/26/2015$745.63197.00
24/27/2015$629.14166.00
24/28/2015$511.65135.00
24/29/2015$477.54126.00
24/30/2015$538.18142.00
25/1/2015$680.90180.00
25/2/2015$787.77208.00
25/3/2015$874.94231.00
25/4/2015$541.77143.00
25/5/2015$439.64116.00
25/6/2015$507.86134.00
25/7/2015$488.91129.00
25/8/2015$667.04176.00
25/9/2015$829.30220.00
25/10/2015$898.23237.00
25/11/2015$544.96144.00
25/12/2015$549.05145.00
25/13/2015$504.07133.00
25/14/2015$526.81139.00
25/15/2015$525.31139.00
25/16/2015$598.82158.00
25/17/2015$807.07213.00
25/18/2015$553.34146.00
25/19/2015$595.03157.00
25/20/2015$560.42148.00
25/21/2015$572.29151.00
25/22/2015$881.87233.00
25/23/2015$913.04241.00
25/24/2015$765.58202.00
25/25/2015$729.42193.00
25/26/2015$424.48112.00
25/27/2015$534.39141.00
25/28/2015$541.52143.00
25/29/2015$526.81139.00
25/30/2015$708.73187.00
25/31/2015$640.01169.00
26/1/2015$454.80120.00
26/2/2015$481.33127.00
26/3/2015$428.27113.00
26/4/2015$576.08152.00
26/5/2015$447.22118.00
26/6/2015$735.26194.00
26/7/2015$807.27213.00
26/8/2015$485.12128.00
26/9/2015$496.49131.00
26/10/2015$534.19141.00
26/11/2015$420.69111.00
26/12/2015$515.44136.00
26/13/2015$629.14166.00
26/14/2015$670.83177.00
26/15/2015$511.65135.00
26/16/2015$458.59121.00
26/17/2015$405.53107.00
26/18/2015$454.80120.00
26/19/2015$560.37148.00
26/20/2015$663.00175.00
26/21/2015$821.93217.00
26/22/2015$454.80120.00
26/23/2015$420.69111.00
26/24/2015$496.49131.00
26/25/2015$625.35165.00
26/26/2015$583.66154.00
26/27/2015$758.00200.00
26/28/2015$727.18192.00
26/29/2015$469.96124.00
26/30/2015$499.03132.00
27/1/2015$442.93117.00
27/2/2015$666.29176.00
27/3/2015$897.73237.00
27/4/2015$746.63197.00
27/5/2015$523.02138.00
27/6/2015$500.28132.00
27/7/2015$500.28132.00
27/8/2015$500.28132.00
27/9/2015$397.95105.00
27/10/2015$575.33152.00
27/11/2015$640.51169.00
27/12/2015$689.78182.00
27/13/2015$462.38122.00
27/14/2015$447.22118.00
27/15/2015$504.07133.00
27/16/2015$462.38122.00
27/17/2015$613.98162.00
27/18/2015$708.73187.00
27/19/2015$663.25175.00
27/20/2015$507.86134.00
27/21/2015$610.19161.00
27/22/2015$538.18142.00
27/23/2015$523.02138.00
27/24/2015$495.99131.00
27/25/2015$860.33227.00
27/26/2015$727.68192.00
27/27/2015$466.17123.00
27/28/2015$488.91129.00
27/29/2015$439.64116.00
27/30/2015$469.96124.00
27/31/2015$579.87153.00
28/1/2015$583.66154.00
28/2/2015$706.23177.00
28/3/2015$542.39136.00
28/4/2015$454.86114.00
28/5/2015$498.75125.00
28/6/2015$498.75125.00
28/7/2015$709.22178.00
28/8/2015$602.49151.00
28/9/2015$765.08192.00
28/10/2015$534.36134.00
28/11/2015$622.44156.00
28/12/2015$522.69131.00
28/13/2015$490.02123.00
28/14/2015$662.34166.00
28/15/2015$546.63137.00
28/16/2015$714.21179.00
28/17/2015$359.1090.00
28/18/2015$546.63137.00
28/19/2015$422.94106.00
28/20/2015$578.05145.00
28/21/2015$673.36169.00
28/22/2015$662.34166.00
28/23/2015$798.00200.00
28/24/2015$594.51149.00
28/25/2015$541.89136.00
28/26/2015$530.17133.00
28/27/2015$466.83117.00
28/28/2015$570.57143.00
28/29/2015$789.52198.00
28/30/2015$791.01199.00
28/31/2015$530.67133.00
29/1/2015$550.62138.00
29/2/2015$514.71129.00
29/3/2015$630.42158.00
29/4/2015$861.84216.00
29/5/2015$921.69231.00
29/6/2015$913.71229.00
29/7/2015$833.91209.00
29/8/2015$574.56144.00
29/9/2015$518.70130.00
29/10/2015$514.71129.00
29/11/2015$562.59141.00
29/12/2015$821.94206.00
29/13/2015$901.74226.00
29/14/2015$642.39161.00
29/15/2015$474.81119.00
29/16/2015$558.60140.00
29/17/2015$593.76149.00
29/18/2015$717.45180.00
29/19/2015$868.32218.00
29/20/2015$1,129.17283.00
29/21/2015$490.77123.00
29/22/2015$514.71129.00
29/23/2015$574.56144.00
29/24/2015$486.78122.00
29/25/2015$713.76179.00
29/26/2015$853.86214.00
29/27/2015$790.02198.00
29/28/2015$542.64136.00
29/29/2015$622.44156.00
29/30/2015$554.61139.00
210/1/2015$578.55145.00
210/2/2015$642.39161.00
210/3/2015$849.87213.00
210/4/2015$853.86214.00
210/5/2015$598.50150.00
210/6/2015$526.68132.00
210/7/2015$590.52148.00
210/8/2015$618.45155.00

<tbody>
</tbody>

<tbody>
</tbody>
 
Last edited:

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
CodeSales DayDollarsUnits
110/08/2014$363.0012101/01/20140
111/08/2014$312.0010429/01/20140
112/08/2014$360.0012026/02/20140
113/08/2014$453.0015126/03/20140
114/08/2014$585.0019523/04/20140
115/08/2014$411.0013721/05/20140
116/08/2014$462.0015418/06/20140
117/08/2014$375.0012516/07/2014345
118/08/2014$288.009613/08/20143773
119/08/2014$369.0012310/09/20144298
120/08/2014$456.0015208/10/20143831
121/08/2014$621.0020705/11/20143931
122/08/2014$414.0013803/12/20143704
123/08/2014$390.0013031/12/20143941
124/08/2014$276.009228/01/20154372
125/08/2014$324.0010825/02/20154516
126/08/2014$330.0011025/03/20154079
127/08/2014$408.0013622/04/20153768
128/08/2014$645.0021520/05/20154299
129/08/2014$453.0015117/06/20153837
130/08/2014$336.0011215/07/20153610
131/08/2014$312.0010412/08/20154138
101/09/2014$288.009609/09/20158579
102/09/2014$339.0011307/10/2015769
103/09/2014$447.0014904/11/20150
104/09/2014$588.0019602/12/20150
105/09/2014$405.0013530/12/20150
106/09/2014$372.00124
107/09/2014$306.00102
108/09/2014$321.00107formula in N2 (0)
109/09/2014$345.00115
110/09/2014$396.00132=SUMPRODUCT(($B$2:$B$428>=M2)*($B$2:$B$428<M3)*($D$2:$D$428))
111/09/2014$788.00315
112/09/2014$500.50200
113/09/2014$413.00164
114/09/2014$489.00195
115/09/2014$443.00177note I changed the dates as you had a mixture
116/09/2014$413.50165of dates and text
117/09/2014$514.00205
118/09/2014$708.00236note 2 at present this is for any code
119/09/2014$498.00166easy to break down by code also
120/09/2014$357.00119
121/09/2014$324.00108will do this if approach ok
122/09/2014$378.00126
123/09/2014$420.00140
124/09/2014$498.00166
125/09/2014$612.00204
126/09/2014$474.00158
127/09/2014$527.25176
128/09/2014$300.00100
129/09/2014$33.0011
130/09/2014$294.0098
101/10/2014$357.00119
102/10/2014$576.00192
103/10/2014$429.00143
104/10/2014$369.00123
105/10/2014$366.00122
106/10/2014$273.0091
107/10/2014$441.00147
108/10/2014$489.00163
109/10/2014$600.00200
110/10/2014$591.00197
111/10/2014$378.00126
112/10/2014$363.00121
113/10/2014$360.00120
114/10/2014$408.00136
115/10/2014$429.00143
116/10/2014$792.00264
117/10/2014$354.00118
118/10/2014$282.0094
119/10/2014$315.00105
120/10/2014$357.00119
121/10/2014$351.00117
122/10/2014$351.00117
123/10/2014$630.00210
124/10/2014$357.00119
125/10/2014$363.00121
126/10/2014$393.00131
127/10/2014$294.0098
128/10/2014$387.00129
129/10/2014$474.00158
130/10/2014$420.00140
131/10/2014$348.00116
101/11/2014$384.00128
102/11/2014$186.0062
103/11/2014$414.00138
104/11/2014$423.00141
105/11/2014$681.00227
106/11/2014$429.00143
107/11/2014$282.0094
108/11/2014$342.00114
109/11/2014$420.00140
110/11/2014$426.00142
111/11/2014$573.00191
112/11/2014$789.00263
113/11/2014$366.00122
114/11/2014$276.0092
115/11/2014$321.00107
116/11/2014$375.00125
117/11/2014$357.00119
118/11/2014$408.00136
119/11/2014$573.00191
120/11/2014$474.00158
121/11/2014$393.00131
122/11/2014$243.0081
123/11/2014$279.0093
124/11/2014$567.00189
125/11/2014$363.00121
126/11/2014$777.00259
127/11/2014$213.0071
128/11/2014$267.0089
129/11/2014$285.0095
130/11/2014$312.00104
101/12/2014$360.00120
102/12/2014$642.00214
103/12/2014$612.00204
104/12/2014$285.0095
105/12/2014$324.00108
106/12/2014$291.0097
107/12/2014$366.00122
108/12/2014$405.00135
109/12/2014$384.00128
110/12/2014$648.00216
111/12/2014$414.00138
112/12/2014$333.00111
113/12/2014$324.00108
114/12/2014$351.00117
115/12/2014$351.00117
116/12/2014$393.00131
117/12/2014$417.00139
118/12/2014$534.00178
119/12/2014$270.0090
120/12/2014$327.00109
121/12/2014$288.0096
122/12/2014$441.00147
123/12/2014$621.00207
124/12/2014$537.00179
125/12/2014$420.00140
126/12/2014$297.0099
127/12/2014$303.00101
128/12/2014$321.00107
129/12/2014$336.00112
130/12/2014$519.00173
131/12/2014$683.00228
101/01/2015$498.00166
102/01/2015$441.00147
103/01/2015$519.00173
104/01/2015$219.0073
105/01/2015$366.00122
106/01/2015$423.00141
107/01/2015$720.00240
108/01/2015$438.00146
109/01/2015$357.00119
110/01/2015$426.00142
111/01/2015$387.00129
112/01/2015$378.00126
113/01/2015$465.00155
114/01/2015$696.00232
115/01/2015$369.00123
116/01/2015$363.00121
117/01/2015$249.0083
118/01/2015$384.00128
119/01/2015$291.0097
120/01/2015$396.00132
121/01/2015$633.00211
122/01/2015$438.00146
123/01/2015$312.00104
124/01/2015$297.0099
125/01/2015$333.00111
126/01/2015$285.0095
127/01/2015$456.00152
128/01/2015$732.00244
129/01/2015$348.00116
130/01/2015$240.0080
131/01/2015$333.00111
101/02/2015$333.00111
102/02/2015$429.00143
103/02/2015$495.00165
104/02/2015$341.50136
105/02/2015$608.00243
106/02/2015$504.50202
107/02/2015$381.00152
108/02/2015$480.50192
109/02/2015$370.00148
110/02/2015$503.50201
111/02/2015$675.00225
112/02/2015$504.00168
113/02/2015$492.00164
114/02/2015$368.00123
115/02/2015$438.00146
116/02/2015$357.00119
117/02/2015$441.00147
118/02/2015$792.00264
119/02/2015$462.00154
120/02/2015$387.00129
121/02/2015$363.00121
122/02/2015$357.00119
123/02/2015$330.00110
124/02/2015$417.00139
125/02/2015$813.00271
126/02/2015$576.00192
127/02/2015$327.00109
128/02/2015$315.00105
101/03/2015$417.00139
102/03/2015$441.00147
103/03/2015$450.00150
104/03/2015$791.00264
105/03/2015$453.00151
106/03/2015$408.00136
107/03/2015$432.00144
108/03/2015$438.00146
109/03/2015$477.00159
110/03/2015$501.00167
111/03/2015$612.00204
112/03/2015$549.00183
113/03/2015$384.00128
114/03/2015$453.00151
115/03/2015$447.00149
116/03/2015$372.00124
117/03/2015$444.00148
118/03/2015$884.25295
119/03/2015$378.00126
120/03/2015$387.00129
121/03/2015$429.00143
122/03/2015$462.00154
123/03/2015$426.00142
124/03/2015$480.00160
125/03/2015$486.00162
126/03/2015$549.00183
127/03/2015$450.00150
128/03/2015$378.00126
129/03/2015$339.00113
130/03/2015$348.00116
131/03/2015$417.00139
101/04/2015$696.00232
102/04/2015$462.00154
103/04/2015$357.00119
104/04/2015$435.00145
105/04/2015$315.00105
106/04/2015$399.00133
107/04/2015$495.00165
108/04/2015$666.00222
109/04/2015$438.00146
110/04/2015$507.00169
111/04/2015$399.00133
112/04/2015$477.00159
113/04/2015$402.00134
114/04/2015$447.00149
115/04/2015$552.00184
116/04/2015$453.00151
117/04/2015$360.00120
118/04/2015$276.0092
119/04/2015$348.00116
120/04/2015$345.00115
121/04/2015$441.00147
122/04/2015$558.00186
123/04/2015$435.00145
124/04/2015$339.00113
125/04/2015$384.00128
126/04/2015$300.00100
127/04/2015$336.00112
128/04/2015$423.00141
129/04/2015$576.00192
130/04/2015$426.00142
101/05/2015$294.0098
102/05/2015$357.00119
103/05/2015$423.00141
104/05/2015$459.00153
105/05/2015$381.00127
106/05/2015$414.00138
107/05/2015$396.00132
108/05/2015$374.00125
109/05/2015$297.0099
110/05/2015$372.00124
111/05/2015$387.00129
112/05/2015$441.00147
113/05/2015$594.00198
114/05/2015$417.00139
115/05/2015$369.00123
116/05/2015$354.00118
117/05/2015$396.00132
118/05/2015$336.00112
119/05/2015$465.00155
120/05/2015$579.00193
121/05/2015$390.00130
122/05/2015$339.00113
123/05/2015$282.0094
124/05/2015$270.0090
125/05/2015$348.00116
126/05/2015$402.00134
127/05/2015$705.50282
128/05/2015$382.00152
129/05/2015$353.50141
130/05/2015$303.50121
131/05/2015$383.00153
101/06/2015$376.50150
102/06/2015$412.50165
103/06/2015$686.00274
104/06/2015$413.00165
105/06/2015$447.50179
106/06/2015$340.50136
107/06/2015$415.00166
108/06/2015$474.50189
109/06/2015$424.00169
110/06/2015$547.50183
111/06/2015$438.00146
112/06/2015$345.00115
113/06/2015$339.00113
114/06/2015$357.00119
115/06/2015$495.00165
116/06/2015$438.00146
117/06/2015$567.00189
118/06/2015$474.00158
119/06/2015$375.00125
120/06/2015$369.00123
121/06/2015$327.00109
122/06/2015$324.00108
123/06/2015$429.00143
124/06/2015$759.00253
125/06/2015$459.00153
126/06/2015$387.00129
127/06/2015$348.00116
128/06/2015$276.0092
129/06/2015$372.00124
130/06/2015$474.00158
101/07/2015$612.00204
102/07/2015$429.00143
103/07/2015$315.00105
104/07/2015$312.00104
105/07/2015$345.00115
106/07/2015$453.00151
107/07/2015$420.00140
108/07/2015$368.25123
109/07/2015$507.00169
110/07/2015$375.00125
111/07/2015$276.0092
112/07/2015$291.0097
113/07/2015$333.00111
114/07/2015$534.00178
115/07/2015$645.00215
116/07/2015$435.00145
117/07/2015$396.00132
118/07/2015$282.0094
119/07/2015$318.00106
120/07/2015$291.0097
121/07/2015$414.00138
122/07/2015$600.00200
123/07/2015$432.00144
124/07/2015$291.0097
125/07/2015$282.0094
126/07/2015$275.0092
127/07/2015$342.00114
128/07/2015$402.00134
129/07/2015$729.00243
130/07/2015$423.00141
131/07/2015$276.0092
101/08/2015$261.0087
102/08/2015$336.00112
103/08/2015$285.0095
104/08/2015$435.00145
105/08/2015$642.00214
106/08/2015$396.00132
107/08/2015$366.00122
108/08/2015$297.0099
109/08/2015$294.0098
210/08/2015$348.6892
211/08/2015$515.44136
212/08/2015$496.49131
213/08/2015$625.35165
214/08/2015$780.24206
215/08/2015$432.06114
216/08/2015$473.75125
217/08/2015$515.44136
218/08/2015$481.33127
219/08/2015$598.82158
220/08/2015$825.47218
221/08/2015$826.22218
222/08/2015$397.95105
223/08/2015$496.09131
224/08/2015$439.14116
225/08/2015$613.63162
226/08/2015$606.40160
227/08/2015$701.15185
228/08/2015$674.62178
229/08/2015$428.27113
230/08/2015$492.20130
231/08/2015$560.92148
201/09/2015$394.16104
202/09/2015$621.01164
203/09/2015$678.41179
204/09/2015$863.22228
205/09/2015$447.22118
206/09/2015$382.79101
207/09/2015$420.69111
208/09/2015$405.18107
209/09/2015$413.11109
210/09/2015$697.01184
211/09/2015$792.11209
212/09/2015$526.81139
213/09/2015$495.49131
214/09/2015$542.91144
215/09/2015$544.91144
216/09/2015$563.96149
217/09/2015$778.44206
218/09/2015$1,111.58370
219/09/2015$499.74165
220/09/2015$614.57203
221/09/2015$690.20229
222/09/2015$841.58280
223/09/2015$1,081.95360
224/09/2015$1,662.24553
225/09/2015$2,287.50760
226/09/2015$2,369.03788
227/09/2015$3,324.971,104.00
228/09/2015$2,723.16905
229/09/2015$1,013.69335
230/09/2015$567.79189
201/10/2015$684.16227
202/10/2015$583.11154
203/10/2015$606.40160
204/10/2015$439.64116
205/10/2015$466.17123
206/10/2015$541.97143
207/10/2015$643.35170
208/10/2015$814.85215
209/10/2015$765.08202
210/10/2015$688.73182

<colgroup><col><col><col><col span="3"><col><col span="5"><col><col span="4"></colgroup><tbody>
</tbody>
 
Upvote 0
Hi,

In cell E1, enter 8 Oct 14.
In cell E2, enter this formula: =IF(1+INT((B2-$F$1)/28)=14,13,1+INT((B2-$F$1)/28)) and copy down your entire list.

This will put a 'period' number next to each entry that updates every 28 days. Note that for the 365 day of the year the answer is forced to be 13, which is why I've used an IF function rather than just 1+INT((B2-$F$1)/28 which gives 14 for that day.

Next, insert a pivot table, use Code as the Row label, use Period as the Column Label (note this will show as 8 Oct 14), then use Dollars as the Values. You will then get a table with all your codes and the amounts for each period.

I have no idea how long this will take to run over 17 million entries though - seems unlikely to be quick!

HTH
 
Upvote 0
Only if you can read it? I've only just realised that its buried in the middle of the second post!

And having posted, I find that the Pivot table on the 750,000 sample I managed to test is actually pretty quick.
 
Upvote 0
Peter - It is your data that makes the post so big. It would be a bit insulting if I typed "scroll over to the right" to see the output and formulas.....

And I didn't say a pivot table was slow. If speed becomes an issue fine tuning may be necessary.
 
Upvote 0
Oldbrewer, no problem, but your post is buried in the middle of a set of data - I haven't posted any data, I wonder whether our browsers are showing the same thing? I agree that getting people to scroll etc is a bit rude.

All I can see of your sumproduct is: SUMPRODUCT(($B$2:$B$428>=M2)*($B$2:$B$428 which is obviously incomplete.

Confused of Devon.

PS. It would be nice if the original OP commented on either of our suggestions!

Regards
 
Upvote 0
DateTimehut1hut2hut3hut1hut2hut3ROW1
31/08/201500:0230,973.0060,785.008,431.0031/08/2015n/an/an/aROW2
01/09/201500:0231,262.0061,136.008,549.0001/09/2015289351118ROW3
02/09/201500:0231,550.0061,486.008,666.0002/09/2015288350117ROW4
03/09/201500:0231,837.0061,835.008,782.0003/09/2015287349116ROW5
04/09/201500:0232,123.0062,183.008,897.0004/09/2015286348115ROW6
05/09/201500:0232,408.0062,530.009,011.0005/09/2015285347114ROW7
06/09/201500:0232,692.0062,876.009,124.0006/09/2015284346113hut1hut2hut3ROW8
07/09/201500:0232,975.0063,221.009,236.0007/09/2015283345112N9>>>>>>01/09/20158228101713071ROW9
08/09/201500:0233,257.0063,565.009,347.0008/09/2015282344111N10>>>>>01/10/2015ROW10
09/09/201500:0233,538.0063,908.009,457.0009/09/2015281343110ROW11
10/09/201500:0233,818.0064,250.009,566.0010/09/2015280342109ROW12
11/09/201500:0234,097.0064,591.009,674.0011/09/20152793411088228 calculated byROW13
12/09/201500:0234,375.0064,931.009,781.0012/09/2015278340107ROW14
13/09/201500:0234,652.0065,270.009,887.0013/09/2015277339106=SUMPRODUCT(($H$3:$H$39>=$N9)*($H$3:$H$39<$N10)*($I$3:$I$39))ROW15
14/09/201500:0234,928.0065,608.009,992.0014/09/2015276338105ROW16
15/09/201500:0235,203.0065,945.0010,096.0015/09/2015275337104ROW17
16/09/201500:0235,477.0066,281.0010,199.0016/09/2015274336103ROW18
17/09/201500:0235,750.0066,616.0010,301.0017/09/2015273335102the right hand table now autopopulatesROW19
18/09/201500:0236,022.0066,950.0010,402.0018/09/2015272334101 as you add new data to the left hand tableROW20
19/09/201500:0236,293.0067,283.0010,502.0019/09/2015271333100ROW21
20/09/201500:0236,563.0067,615.0010,601.0020/09/201527033299ROW22
21/09/201500:0236,832.0067,946.0010,699.0021/09/201526933198the formula in the empty cell to the leftROW23
22/09/201500:0237,100.0068,276.0010,796.0022/09/201526833097of the cell marked ###### isROW24
23/09/201500:0237,367.0068,605.0010,892.0023/09/201526732996ROW25
24/09/201500:0237,633.0068,933.0010,987.0024/09/201526632895=IF($H40="","",E40-E39)ROW26
25/09/201500:0237,898.0069,260.0011,081.0025/09/201526532794ROW27
26/09/201500:0238,162.0069,586.0011,174.0026/09/201526432693H40 will only fill if A40 is not blankROW28
27/09/201500:0238,425.0069,911.0011,266.0027/09/201526332592ROW29
28/09/201500:0238,683.0070,259.0011,345.0028/09/201525834879ROW30
29/09/201500:0238,943.0070,605.0011,423.0029/09/201526034678ROW31
30/09/201500:0239,201.0070,956.0011,502.0030/09/201525835179ROW32
01/10/201500:0239,463.0071,302.0011,580.0001/10/201526234678ROW33
02/10/201500:0239,723.0071,643.0011,659.0002/10/201526034179ROW34
03/10/201500:0239,986.0071,983.0011,737.0003/10/201526334078ROW35
04/10/201500:0240,247.0072,312.0011,816.0004/10/201526132979ROW36
05/10/201500:0240,510.0072,638.0011,894.0005/10/201526332678ROW37
06/10/201500:0240,773.0072,960.0011,973.0006/10/201526332279ROW38
07/10/201500:0241,023.0073,272.0012,051.0007/10/201525031278ROW39
H40>>>>#####ROW40
ROW41
ROW42
ABCDEFGHIJKLMNOPQRST

<colgroup><col><col><col span="3"><col><col><col><col><col><col><col span="2"><col><col span="6"></colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,971
Messages
6,122,520
Members
449,088
Latest member
RandomExceller01

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