Calculate on every third Friday of the month and show results between positive & negative weeks

15minoffame

Board Regular
Joined
Nov 26, 2014
Messages
55
Hi everyone,
First, I'd like to wish Mr.Excel.com a belated 25th birthday! I know I can use the Mod function to calculate between every X number of rows, but how is it calculated when between every X week the number of weeks is not uniform? This spreadsheet shows the weekly return of Microsoft since 2021. Every third week of every month is the monthly expiration cycle. The problem is Yahoo starts each week on a Monday, but the expiration is every third Friday of the month. I highlighted a few in red so you get the idea.

I would like to know TWO averages.

1) The average of all the bold columns for only the red highlighted rows aka monthly expiration week.
2) In addition, is it even possible to calculate the avgs between positive & negative weeks? The reason for this is because the O-H (Open-High) is much higher when it's a positive return week while the O-L (Open-Low) is the higher number during the negative weeks.

Thank you!

DateOpenHighLowCloseG/L %PtsO-HO-H %O-LO-L %
12/28/2020224.45227.18219.68216.60292.73-4.77
1/4/2021222.53223211.94213.8761-1.26%-2.730.470.21%-10.59-4.76%
1/11/2021218.47218.91212.03207.0884-3.17%-6.790.440.20%-6.44-2.95%
1/18/2021213.75230.07212.63220.04066.25%12.9516.327.64%-1.12-0.52%
1/25/2021229.12242.64224.22225.89342.66%5.8513.525.90%-4.90-2.14%
2/1/2021235.06245.09232.43235.86564.41%9.9710.034.27%-2.63-1.12%
2/8/2021243.15245.92240.81238.58261.15%2.722.771.14%-2.34-0.96%
2/15/2021245.03246.13240.18234.6677-1.64%-3.911.100.45%-4.85-1.98%
2/22/2021237.42237.93227.88226.8236-3.34%-7.840.510.21%-9.54-4.02%
3/1/2021235.9237.47224.26226.0623-0.34%-0.761.570.67%-11.64-4.93%
3/8/2021231.37239.17227.13230.11311.79%4.057.803.37%-4.24-1.83%
3/15/2021234.96240.06229.35224.8422-2.29%-5.275.102.17%-5.61-2.39%
3/22/2021230.27241.05230.14230.82562.66%5.9810.784.68%-0.13-0.06%
3/29/2021236.59242.84231.1236.55532.48%5.736.252.64%-5.49-2.32%
4/5/2021242.76255.99242.7249.73255.57%13.1813.235.45%-0.06-0.02%
4/12/2021254.71261254.62254.50551.91%4.776.292.47%-0.09-0.04%
4/19/2021260.19261.78255.64254.90570.16%0.401.590.61%-4.55-1.75%
4/26/2021261.66263.19249246.1502-3.43%-8.761.530.58%-12.66-4.84%
5/3/2021253.4254.35244.69246.42350.11%0.270.950.37%-8.71-3.44%
5/10/2021250.87251.73238.07242.2166-1.71%-4.210.860.34%-12.80-5.10%
5/17/2021246.55248.33238.6239.3078-1.20%-2.911.780.72%-7.95-3.22%
5/24/2021247.79252.94247.51244.27272.07%4.965.152.08%-0.28-0.11%
5/31/2021251.23251.65243245.35870.44%1.090.420.17%-8.23-3.28%
6/7/2021249.98258.49249.81252.30492.83%6.958.513.40%-0.17-0.07%
6/14/2021257.9262.3254.42253.81160.60%1.514.401.71%-3.48-1.35%
6/21/2021259.82267.85257.92259.28052.15%5.478.033.09%-1.90-0.73%
6/28/2021266.19278265.91271.6374.77%12.3611.814.44%-0.28-0.11%
7/5/2021278.03280.69274.3271.92070.10%0.282.660.96%-3.73-1.34%
7/12/2021279.16284.1276.58274.66991.01%2.754.941.77%-2.58-0.92%
7/19/2021278.93289.99274.45283.39673.18%8.7311.063.97%-4.48-1.61%
7/26/2021289290.15282.95278.7398-1.64%-4.661.150.40%-6.05-2.09%
8/2/2021286.36289.63283.74283.19121.60%4.453.271.14%-2.62-0.91%
8/9/2021289.75292.9285.2286.50781.17%3.323.151.09%-4.55-1.57%
8/16/2021293.19305.84288.64297.76853.93%11.2612.654.31%-4.55-1.55%
8/23/2021303.25305.65296.83293.7904-1.34%-3.982.400.79%-6.42-2.12%
8/30/2021301.12305.19300.18295.18230.47%1.394.071.35%-0.94-0.31%
9/6/2021301.01302.14295.38289.8597-1.80%-5.321.130.38%-5.63-1.87%
9/13/2021297.55305.32294.08293.93741.41%4.087.772.61%-3.47-1.17%
9/20/2021296.33300.9289.52293.4277-0.17%-0.514.571.54%-6.81-2.30%
9/27/2021296.14296.47281.29283.3805-3.42%-10.050.330.11%-14.85-5.01%
10/4/2021287.4296.64280.25289.01681.99%5.649.243.22%-7.15-2.49%
10/11/2021292.92304.45292.35298.19153.17%9.1711.533.94%-0.57-0.19%
10/18/2021303.57311.09302.69303.04361.63%4.857.522.48%-0.88-0.29%
10/25/2021309.36332306.46325.05937.26%22.0222.647.32%-2.90-0.94%
11/1/2021331.36338.79326.37329.41151.34%4.357.432.24%-4.99-1.51%
11/8/2021337.3338.72329.92330.05840.20%0.651.420.42%-7.38-2.19%
11/15/2021337.54345.1334.03336.32191.90%6.267.562.24%-3.51-1.04%
11/22/2021344.62349.67328.12323.7488-3.74%-12.575.051.47%-16.50-4.79%
11/29/2021334.94339.28318.03317.1989-2.02%-6.554.341.30%-16.91-5.05%
12/6/2021323.95343319.23336.37756.05%19.1819.055.88%-4.72-1.46%
12/13/2021340.68343.79317.25317.9747-5.47%-18.403.110.91%-23.43-6.88%
12/20/2021320.05336.39317.57328.66883.36%10.6916.345.11%-2.48-0.77%
12/27/2021335.46344.3335.43330.26940.49%1.608.842.64%-0.03-0.01%
1/3/2022335.35338310.09308.3903-6.62%-21.882.650.79%-25.26-7.53%
1/10/2022309.49323.41303.75304.6193-1.22%-3.7713.924.50%-5.74-1.85%
1/17/2022304.07313.91295.61290.7043-4.57%-13.929.843.24%-8.46-2.78%
1/24/2022292.2308.5276.05302.71434.13%12.0116.305.58%-16.15-5.53%
1/31/2022308.95315.12299.96300.436-0.75%-2.286.172.00%-8.99-2.91%
2/7/2022306.17311.93294.22289.7321-3.56%-10.705.761.88%-11.95-3.90%
2/14/2022293.77300.87286.31282.7499-2.41%-6.987.102.42%-7.46-2.54%
2/21/2022285297.63271.52292.56493.47%9.8112.634.43%-13.48-4.73%
2/28/2022294.31303.13287.17285.2338-2.51%-7.338.823.00%-7.14-2.43%
3/7/2022288.53289.69270275.6001-3.38%-9.631.160.40%-18.53-6.42%
3/14/2022280.34301275.82295.63517.27%20.0420.667.37%-4.52-1.61%
3/21/2022298.89305.5294.9298.83331.08%3.206.612.21%-3.99-1.33%
3/28/2022304.33315.95304.33304.48171.89%5.6511.623.82%0.000.00%
4/4/2022310.09315.11296.28292.2304-4.02%-12.255.021.62%-13.81-4.45%
4/11/2022291.79292.61279.32275.3639-5.77%-16.870.820.28%-12.47-4.27%
4/18/2022278.91293.3273.38269.6565-2.07%-5.7114.395.16%-5.53-1.98%
4/25/2022273.29290.98270273.09081.27%3.4317.696.47%-3.29-1.20%
5/2/2022277.71290.88271.27270.3453-1.01%-2.7513.174.74%-6.44-2.32%
5/9/2022270.06273.75250.02256.9525-4.95%-13.393.691.37%-20.04-7.42%
5/16/2022259.96268.33246.44248.5291-3.28%-8.428.373.22%-13.52-5.20%
5/23/2022255.49273.34253.43269.50538.44%20.9817.856.99%-2.06-0.81%
5/30/2022272.53277.69261.6266.3293-1.18%-3.185.161.89%-10.93-4.01%
6/6/2022272.06274.18252.53249.5321-6.31%-16.802.120.78%-19.53-7.18%
6/13/2022245.11255.3241.51244.2651-2.11%-5.2710.194.16%-3.60-1.47%
6/20/2022250.26267.98249.51264.0418.10%19.7817.727.08%-0.75-0.30%
6/27/2022268.21268.3252.9256.032-3.03%-8.010.090.03%-15.31-5.71%
7/4/2022256.16269.06254.74264.00163.11%7.9712.905.04%-1.42-0.55%
7/11/2022265.65266.53245.94253.2111-4.09%-10.790.880.33%-19.71-7.42%
7/18/2022259.75265.33253.3256.80141.42%3.595.582.15%-6.45-2.48%
7/25/2022261282249.57276.90277.83%20.1021.008.05%-11.43-4.38%
8/1/2022277.82283.8272.38279.04320.77%2.145.982.15%-5.44-1.96%
8/8/2022284.05291.91277.61287.92013.18%8.887.862.77%-6.44-2.27%
8/15/2022291294.18285.56282.2388-1.97%-5.683.181.09%-5.44-1.87%
8/22/2022282.08282.46267.98264.987-6.11%-17.250.380.13%-14.10-5.00%
8/29/2022265.85267.4254.47253.0962-4.49%-11.891.550.58%-11.38-4.28%
9/5/2022256.2265.23251.94261.3993.28%8.309.033.52%-4.26-1.66%
9/12/2022265.78267.45242.06241.9073-7.46%-19.491.670.63%-23.72-8.92%
9/19/2022242.47247.66235.2235.1662-2.79%-6.745.192.14%-7.27-3.00%
9/26/2022237.05242.33232.73230.2043-2.11%-4.965.282.23%-4.32-1.82%
10/3/2022235.41250.58233.17231.52880.58%1.3215.176.44%-2.24-0.95%
10/10/2022233.05237.24219.13225.9145-2.42%-5.614.191.80%-13.92-5.97%
10/17/2022235.82243.93234.29239.31765.93%13.408.113.44%-1.53-0.65%
10/24/2022243.76251.04225.78233.1399-2.58%-6.187.282.99%-17.98-7.38%
10/31/2022233.76235.74213.43218.8275-6.14%-14.311.980.85%-20.33-8.70%
11/7/2022221.99247.99221.28244.249811.62%25.4226.0011.71%-0.71-0.32%
11/14/2022241.99247237.63238.428-2.38%-5.825.012.07%-4.36-1.80%
11/21/2022241.43248.7240.71245.31482.89%6.897.273.01%-0.72-0.30%
11/28/2022246.08256.12238.21252.77863.04%7.4610.044.08%-7.87-3.20%
12/5/2022252.01253.82242.21243.263-3.76%-9.521.810.72%-9.80-3.89%
12/12/2022247.45263.92243.51242.5394-0.30%-0.7216.476.66%-3.94-1.59%
12/19/2022244.86245.62233.87236.6318-2.44%-5.910.760.31%-10.99-4.49%
12/26/2022238.7241.92234.17237.71220.46%1.083.221.35%-4.53-1.90%
1/2/2023243.08245.75219.35222.9531-6.21%-14.762.671.10%-23.73-9.76%
1/9/2023226.45239.9226.41237.12746.36%14.1713.455.94%-0.04-0.02%
1/16/2023237.97242.38230.68238.10870.41%0.984.411.85%-7.29-3.06%
1/23/2023241.1249.83230.9245.97893.31%7.878.733.62%-10.20-4.23%
1/30/2023244.51264.69242.2256.07944.11%10.1020.188.25%-2.31-0.94%
2/6/2023257.44276.76254.78260.78761.84%4.7119.327.50%-2.66-1.03%
2/13/2023267.64274.97256255.7919-1.92%-5.007.332.74%-11.64-4.35%
2/20/2023254.48256.84248.1247.6483-3.18%-8.142.360.93%-6.38-2.51%
2/27/2023252.46255.62245.61253.68012.44%6.033.161.25%-6.85-2.71%
3/6/2023256.43260.12247.6247.0223-2.62%-6.663.691.44%-8.83-3.44%
3/13/2023247.4283.33245.73277.667812.41%30.6535.9314.52%-1.67-0.68%
3/20/2023276.98281.06269.52278.80070.41%1.134.081.47%-7.46-2.69%
3/27/2023280.5289.27272.05286.48192.76%7.688.773.13%-8.45-3.01%
4/3/2023286.52292.08282.03289.76111.14%3.285.561.94%-4.49-1.57%
4/10/2023289.21289.9281.64284.3355-1.87%-5.430.690.24%-7.57-2.62%
4/17/2023289.93291.76283.06283.9579-0.13%-0.381.830.63%-6.87-2.37%
4/24/2023282.09308.93275.37305.32247.52%21.3626.849.51%-6.72-2.38%
5/1/2023306.97311.97303.4308.69091.10%3.375.001.63%-3.57-1.16%
5/8/2023310.13313306.09307.0216-0.54%-1.672.870.93%-4.04-1.30%
5/15/2023309.1319.04307.59316.33253.03%9.319.943.22%-1.51-0.49%
5/22/2023318.6333.4312.61331.51394.80%15.1814.804.65%-5.99-1.88%
5/29/2023335.23337.5324.72334.01340.75%2.502.270.68%-10.51-3.14%
6/5/2023335.22338.56322.5325.4391-2.57%-8.573.341.00%-12.72-3.79%
6/12/2023328.58351.47325.16340.91484.76%15.4822.896.97%-3.42-1.04%
6/19/2023339.31342.08332.07333.635-2.14%-7.282.770.82%-7.24-2.13%
6/26/2023333.72342.73328.49339.13221.65%5.509.012.70%-5.23-1.57%
7/3/2023339.19342.99334.73335.8259-0.97%-3.313.801.12%-4.46-1.31%
7/10/2023334.6351.43327343.81272.38%7.9916.835.03%-7.60-2.27%
7/17/2023345.68366.78339.83342.3488-0.43%-1.4621.106.10%-5.85-1.69%
7/24/2023345.85351.89329.05336.9712-1.57%-5.386.041.75%-16.80-4.86%
7/31/2023336.92338.54325.95326.425-3.13%-10.551.620.48%-10.97-3.26%
8/7/2023328.37331.11319.21319.683-2.07%-6.742.740.83%-9.16-2.79%
8/14/2023321.39325.09311.55315.1717-1.41%-4.513.701.15%-9.84-3.06%
8/21/2023317.93332.98317.04322.32582.27%7.1515.054.73%-0.89-0.28%
8/28/2023325.66331.99321.72327.99431.76%5.676.331.94%-3.94-1.21%
9/4/2023329336.16328.66333.59291.71%5.607.162.18%-0.34-0.10%
9/11/2023337.24340.86329.65329.5511-1.21%-4.043.621.07%-7.59-2.25%
9/18/2023327.8330.4315316.3679-4.00%-13.182.600.79%-12.80-3.90%
9/25/2023316.59319.47309.45315.1104-0.40%-1.262.880.91%-7.14-2.26%
10/2/2023316.28329.19311.21326.59713.65%11.4912.914.08%-5.07-1.60%
10/9/2023324.75333.83323.18327.06620.14%0.479.082.80%-1.57-0.48%
10/16/2023331.05336.88325.45326.0083-0.32%-1.065.831.76%-5.60-1.69%
10/23/2023325.47346.2324.39329.1420.96%3.1320.736.37%-1.08-0.33%
10/30/2023333.41354.39331.83352.08546.97%22.9420.986.29%-1.58-0.47%
11/6/2023353.45370.1353.35368.92124.78%16.8416.654.71%-0.10-0.03%
11/13/2023368.22376.35365.9369.10090.05%0.188.132.21%-2.32-0.63%
11/20/2023371.22379.79371377.432.26%8.338.572.31%-0.22-0.06%
11/27/2023376.78384.3371.31374.51-0.77%-2.927.522.00%-5.47-1.45%
12/4/2023369.1374.46362.9374.23-0.07%-0.285.361.45%-6.20-1.68%
12/11/2023368.48377.64364.13370.73-0.94%-3.509.162.49%-4.35-1.18%
12/18/2023369.45376.03368.68374.581.04%3.856.581.78%-0.77-0.21%
12/25/2023375377.16372.81376.040.39%1.462.160.58%-2.19-0.58%
 
One suggestion that may work since you don't say what version of excel you use (Nevermind, you answered this earlier, but please update your profile with this so the forum doesn't have to ask you).
Change all of the SUM functions to SUMPRODUCT.

I have done this on the xl2bb mini sheet below.

If that doesn't work, again....

Please post the formula so it can be copied. If there is an error in your formula I could reverse error and get it to work and not know i changed your formula.

You have not addressed the calculation of the values in columns F:K, are my guesses correct? Shouldn't the same formula be used for your thrice weekly averages insteaded of averaging of percentages?

You also seem to have columns in your workbook now that were not in the other. Yet you do not post an image of the mini worksheet I asked you to?
Please don't change your scenario and expect the forum to just figure it out.

Please do what I asked in Post #7. Do not post an image. Post a table if you can't use xl2bb.
... put column and row headers (letters and numbers) on the table.
.... copy and paste the FORMULAS for all the errors you have, and tell what cell the formula is in.

Make no changes, insert no columns.
Do not change formulas.

Thanks in advance.


Book1
ABCDEFGHIJK
1DateOpenHighLowCloseG/L %PtsO-HO-H %O-LO-L %
22020-12-28224.45227.18219.68216.60292.73-4.77
32021-01-04222.53223.00211.94213.8761-1.26%-2.730.470.21%-10.59-4.76%
42021-01-11218.47218.91212.03207.0884-3.17%-6.790.440.20%-6.44-2.95%
52021-01-18213.75230.07212.63220.04066.25%12.9516.327.64%-1.12-0.52%
62021-01-25229.12242.64224.22225.89342.66%5.8513.525.90%-4.90-2.14%
72021-02-01235.06245.09232.43235.86564.41%9.9710.034.27%-2.63-1.12%
82021-02-08243.15245.92240.81238.58261.15%2.722.771.14%-2.34-0.96%
92021-02-15245.03246.13240.18234.6677-1.64%-3.911.100.45%-4.85-1.98%
102021-02-22237.42237.93227.88226.8236-3.34%-7.840.510.21%-9.54-4.02%
112021-03-01235.90237.47224.26226.0623-0.34%-0.761.570.67%-11.64-4.93%
122021-03-08231.37239.17227.13230.11311.79%4.057.803.37%-4.24-1.83%
132021-03-15234.96240.06229.35224.8422-2.29%-5.275.102.17%-5.61-2.39%
142021-03-22230.27241.05230.14230.82562.66%5.9810.784.68%-0.13-0.06%
152021-03-29236.59242.84231.10236.55532.48%5.736.252.64%-5.49-2.32%
162021-04-05242.76255.99242.70249.73255.57%13.1813.235.45%-0.06-0.02%
172021-04-12254.71261.00254.62254.50551.91%4.776.292.47%-0.09-0.04%
182021-04-19260.19261.78255.64254.90570.16%0.401.590.61%-4.55-1.75%
192021-04-26261.66263.19249.00246.1502-3.43%-8.761.530.58%-12.66-4.84%
202021-05-03253.40254.35244.69246.42350.11%0.270.950.37%-8.71-3.44%
212021-05-10250.87251.73238.07242.2166-1.71%-4.210.860.34%-12.80-5.10%
222021-05-17246.55248.33238.60239.3078-1.20%-2.911.780.72%-7.95-3.22%
232021-05-24247.79252.94247.51244.27272.07%4.965.152.08%-0.28-0.11%
242021-05-31251.23251.65243.00245.35870.44%1.090.420.17%-8.23-3.28%
252021-06-07249.98258.49249.81252.30492.83%6.958.513.40%-0.17-0.07%
262021-06-14257.90262.30254.42253.81160.60%1.514.401.71%-3.48-1.35%
272021-06-21259.82267.85257.92259.28052.15%5.478.033.09%-1.90-0.73%
282021-06-28266.19278.00265.91271.63704.77%12.3611.814.44%-0.28-0.11%
292021-07-05278.03280.69274.30271.92070.10%0.282.660.96%-3.73-1.34%
302021-07-12279.16284.10276.58274.66991.01%2.754.941.77%-2.58-0.92%
312021-07-19278.93289.99274.45283.39673.18%8.7311.063.97%-4.48-1.61%
322021-07-26289.00290.15282.95278.7398-1.64%-4.661.150.40%-6.05-2.09%
332021-08-02286.36289.63283.74283.19121.60%4.453.271.14%-2.62-0.91%
342021-08-09289.75292.90285.20286.50781.17%3.323.151.09%-4.55-1.57%
352021-08-16293.19305.84288.64297.76853.93%11.2612.654.31%-4.55-1.55%
362021-08-23303.25305.65296.83293.7904-1.34%-3.982.400.79%-6.42-2.12%
372021-08-30301.12305.19300.18295.18230.47%1.394.071.35%-0.94-0.31%
382021-09-06301.01302.14295.38289.8597-1.80%-5.321.130.38%-5.63-1.87%
392021-09-13297.55305.32294.08293.93741.41%4.087.772.61%-3.47-1.17%
402021-09-20296.33300.90289.52293.4277-0.17%-0.514.571.54%-6.81-2.30%
412021-09-27296.14296.47281.29283.3805-3.42%-10.050.330.11%-14.85-5.01%
422021-10-04287.40296.64280.25289.01681.99%5.649.243.22%-7.15-2.49%
432021-10-11292.92304.45292.35298.19153.17%9.1711.533.94%-0.57-0.19%
442021-10-18303.57311.09302.69303.04361.63%4.857.522.48%-0.88-0.29%
452021-10-25309.36332.00306.46325.05937.26%22.0222.647.32%-2.90-0.94%
462021-11-01331.36338.79326.37329.41151.34%4.357.432.24%-4.99-1.51%
472021-11-08337.30338.72329.92330.05840.20%0.651.420.42%-7.38-2.19%
482021-11-15337.54345.10334.03336.32191.90%6.267.562.24%-3.51-1.04%
492021-11-22344.62349.67328.12323.7488-3.74%-12.575.051.47%-16.50-4.79%
502021-11-29334.94339.28318.03317.1989-2.02%-6.554.341.30%-16.91-5.05%
512021-12-06323.95343.00319.23336.37756.05%19.1819.055.88%-4.72-1.46%
522021-12-13340.68343.79317.25317.9747-5.47%-18.403.110.91%-23.43-6.88%
532021-12-20320.05336.39317.57328.66883.36%10.6916.345.11%-2.48-0.77%
542021-12-27335.46344.30335.43330.26940.49%1.608.842.64%-0.03-0.01%
552022-01-03335.35338.00310.09308.3903-6.62%-21.882.650.79%-25.26-7.53%
562022-01-10309.49323.41303.75304.6193-1.22%-3.7713.924.50%-5.74-1.85%
572022-01-17304.07313.91295.61290.7043-4.57%-13.929.843.24%-8.46-2.78%
582022-01-24292.20308.50276.05302.71434.13%12.0116.305.58%-16.15-5.53%
592022-01-31308.95315.12299.96300.4360-0.75%-2.286.172.00%-8.99-2.91%
602022-02-07306.17311.93294.22289.7321-3.56%-10.705.761.88%-11.95-3.90%
612022-02-14293.77300.87286.31282.7499-2.41%-6.987.102.42%-7.46-2.54%
622022-02-21285.00297.63271.52292.56493.47%9.8112.634.43%-13.48-4.73%
632022-02-28294.31303.13287.17285.2338-2.51%-7.338.823.00%-7.14-2.43%
642022-03-07288.53289.69270.00275.6001-3.38%-9.631.160.40%-18.53-6.42%
652022-03-14280.34301.00275.82295.63517.27%20.0420.667.37%-4.52-1.61%
662022-03-21298.89305.50294.90298.83331.08%3.206.612.21%-3.99-1.33%
672022-03-28304.33315.95304.33304.48171.89%5.6511.623.82%0.000.00%
682022-04-04310.09315.11296.28292.2304-4.02%-12.255.021.62%-13.81-4.45%
692022-04-11291.79292.61279.32275.3639-5.77%-16.870.820.28%-12.47-4.27%
702022-04-18278.91293.30273.38269.6565-2.07%-5.7114.395.16%-5.53-1.98%
712022-04-25273.29290.98270.00273.09081.27%3.4317.696.47%-3.29-1.20%
722022-05-02277.71290.88271.27270.3453-1.01%-2.7513.174.74%-6.44-2.32%
732022-05-09270.06273.75250.02256.9525-4.95%-13.393.691.37%-20.04-7.42%
742022-05-16259.96268.33246.44248.5291-3.28%-8.428.373.22%-13.52-5.20%
752022-05-23255.49273.34253.43269.50538.44%20.9817.856.99%-2.06-0.81%
762022-05-30272.53277.69261.60266.3293-1.18%-3.185.161.89%-10.93-4.01%
772022-06-06272.06274.18252.53249.5321-6.31%-16.802.120.78%-19.53-7.18%
782022-06-13245.11255.30241.51244.2651-2.11%-5.2710.194.16%-3.60-1.47%
792022-06-20250.26267.98249.51264.04108.10%19.7817.727.08%-0.75-0.30%
802022-06-27268.21268.30252.90256.0320-3.03%-8.010.090.03%-15.31-5.71%
812022-07-04256.16269.06254.74264.00163.11%7.9712.905.04%-1.42-0.55%
822022-07-11265.65266.53245.94253.2111-4.09%-10.790.880.33%-19.71-7.42%
832022-07-18259.75265.33253.30256.80141.42%3.595.582.15%-6.45-2.48%
842022-07-25261.00282.00249.57276.90277.83%20.1021.008.05%-11.43-4.38%
852022-08-01277.82283.80272.38279.04320.77%2.145.982.15%-5.44-1.96%
862022-08-08284.05291.91277.61287.92013.18%8.887.862.77%-6.44-2.27%
872022-08-15291.00294.18285.56282.2388-1.97%-5.683.181.09%-5.44-1.87%
882022-08-22282.08282.46267.98264.9870-6.11%-17.250.380.13%-14.10-5.00%
892022-08-29265.85267.40254.47253.0962-4.49%-11.891.550.58%-11.38-4.28%
902022-09-05256.20265.23251.94261.39903.28%8.309.033.52%-4.26-1.66%
912022-09-12265.78267.45242.06241.9073-7.46%-19.491.670.63%-23.72-8.92%
922022-09-19242.47247.66235.20235.1662-2.79%-6.745.192.14%-7.27-3.00%
932022-09-26237.05242.33232.73230.2043-2.11%-4.965.282.23%-4.32-1.82%
942022-10-03235.41250.58233.17231.52880.58%1.3215.176.44%-2.24-0.95%
952022-10-10233.05237.24219.13225.9145-2.42%-5.614.191.80%-13.92-5.97%
962022-10-17235.82243.93234.29239.31765.93%13.408.113.44%-1.53-0.65%
972022-10-24243.76251.04225.78233.1399-2.58%-6.187.282.99%-17.98-7.38%
982022-10-31233.76235.74213.43218.8275-6.14%-14.311.980.85%-20.33-8.70%
992022-11-07221.99247.99221.28244.249811.62%25.4226.0011.71%-0.71-0.32%
100274.18280.43266.59267.5913-0.83%-2.346.252.26%-7.59-2.75%
Sheet1
Cell Formulas
RangeFormula
B100:K100B100=SUMPRODUCT((DAY(($A2:$A99)+4)<=21)*(DAY(($A2:$A99)+4)>=15)*(WEEKDAY(($A2:$A99)+4,2)=5)*(B2:B99)) / SUMPRODUCT((DAY(($A2:$A99)+4)<=21)*(DAY(($A2:$A99)+4)>=15)*(WEEKDAY(($A2:$A99)+4,2)=5))
The Sumproduct works! Thank you so much! What would I need to change in the formula for the 1st, 2nd, and 4th Friday of every month?
 
Upvote 0

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Okay, I'm happy I thought of that. And as I asked, please update your profile to reflect your excel version. the SUM array functionality doesn't seem to work in 2016, but it does in 365 (your version vs mine). You also could have had it work with the SUM function by pressing "CNTL-SHFT-ENTR" (commonly called CSE keystroke) instead of just ENTER when committing the formulas in a cell.

to select the different Fridays change the 15 and 21 parts of the formula to what ever possible dates are for the Fridays you seek:
First Fridays can only be 1st through 7th,
Second can only be 8th through 14th
I'll let you guess the Fourth Friday ranges.
This is the part of each formula you need to change. You can change all with the REPLACE -CNTRL-H tool. But, be sure not change any cell references that have identical numbers, so the change value should include the text before and/or after ... like change "<=21" to "<=14"... etc:

(DAY(($A2:$A99)+4)<=21)*(DAY(($A2:$A99)+4)>=15)

The 4 in the formula depends on the day of the week your "date" column is in your calendar. Since you have Mondays, Fridays are 4 days later. If for some reason you changed that date to Wednesdays you would need to change all the 4's to 2. The formula will not work if you have mixed weekdays in that column. (but you "COULD" update the formula with a calculation to account for that - but I'm not going to do that. Maybe you can think on it if you're curious).

Best wishes!
 
Upvote 0
Okay, I'm happy I thought of that. And as I asked, please update your profile to reflect your excel version. the SUM array functionality doesn't seem to work in 2016, but it does in 365 (your version vs mine). You also could have had it work with the SUM function by pressing "CNTL-SHFT-ENTR" (commonly called CSE keystroke) instead of just ENTER when committing the formulas in a cell.

to select the different Fridays change the 15 and 21 parts of the formula to what ever possible dates are for the Fridays you seek:
First Fridays can only be 1st through 7th,
Second can only be 8th through 14th
I'll let you guess the Fourth Friday ranges.
This is the part of each formula you need to change. You can change all with the REPLACE -CNTRL-H tool. But, be sure not change any cell references that have identical numbers, so the change value should include the text before and/or after ... like change "<=21" to "<=14"... etc:

(DAY(($A2:$A99)+4)<=21)*(DAY(($A2:$A99)+4)>=15)

The 4 in the formula depends on the day of the week your "date" column is in your calendar. Since you have Mondays, Fridays are 4 days later. If for some reason you changed that date to Wednesdays you would need to change all the 4's to 2. The formula will not work if you have mixed weekdays in that column. (but you "COULD" update the formula with a calculation to account for that - but I'm not going to do that. Maybe you can think on it if you're curious).

Best wishes!
I went to my profile, but couldn't see where I can add my excel version so how do I do this?
 
Upvote 0
Could you please help me with the second part of the initial question. Is there a way to get the average between winning & losing weeks? In other words, separate these two weeks and then get the average.
 
Upvote 0
Can anyone else help me in getting the average & Win / Loss count between the green & red weeks of the monthly option expiration weeks over the past three years? For those of you who are not familiar with stocks, every third Friday of every month is known as monthly option expiration week. This is the most important week due to volatility so it's an advantage to have stats to show the average High > Open and Low < Open to determine how to structure options buying. I have Excel 2016.

Thank you!
 
Upvote 0

Forum statistics

Threads
1,215,071
Messages
6,122,963
Members
449,094
Latest member
Anshu121

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