Average of income for the last 6 months (rolling) excluding weekends

Carlos5

Board Regular
Joined
Jan 14, 2015
Messages
58
Hello all, I did search but I can't find anything that helps me so here goes:
I am using Excel 2019. Column A has the date, Column B has the day (Mon, Tues, etc), and column C has the total $ made for that day. I am trying to write a formula to give me the average of the last 6 months excluding Sat and Sun. I assume I could use the Column B (the Day column) to exclude Sat and Sun. and use the TODAY() function -180 days to get the time frame but I can't seem to put the two togther.
Thanks for any help you can give me.
 
@Carlos5
Post #2 gives a running 6 months average excluding weekends.
None of the solutions that have been offered use VBA.
 
Upvote 0

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Another option. You will get the average of the last 180 days excluding weekends
Remember to enter the formula with Ctrl+Shift+Enter as it is an array formula.

Libro1
ABCDE
1DateEarningsAverage of last 180 days
201/01/2023 do493,00269,07
302/01/2023 lu214,00
403/01/2023 ma79,00
504/01/2023 mi385,00
605/01/2023 ju100,00
706/01/2023 vi207,00
807/01/2023 sá256,00
908/01/2023 do170,00
1009/01/2023 lu429,00
1110/01/2023 ma209,00
1211/01/2023 mi467,00
1312/01/2023 ju413,00
1413/01/2023 vi466,00
1514/01/2023 sá245,00
1615/01/2023 do421,00
1716/01/2023 lu456,00
1817/01/2023 ma146,00
1918/01/2023 mi112,00
Hoja1
Cell Formulas
RangeFormula
E2E2=SUM((A2:A10000>TODAY()-180)*(WEEKDAY(A2:A10000,2)<6)*C2:C10000)/SUM((A2:A10000>TODAY()-180)*(WEEKDAY(A2:A10000,2)<6))
 
Upvote 0
Solution
Another option. You will get the average of the last 180 days excluding weekends
Remember to enter the formula with Ctrl+Shift+Enter as it is an array formula.

Libro1
ABCDE
1DateEarningsAverage of last 180 days
201/01/2023 do493,00269,07
302/01/2023 lu214,00
403/01/2023 ma79,00
504/01/2023 mi385,00
605/01/2023 ju100,00
706/01/2023 vi207,00
807/01/2023 sá256,00
908/01/2023 do170,00
1009/01/2023 lu429,00
1110/01/2023 ma209,00
1211/01/2023 mi467,00
1312/01/2023 ju413,00
1413/01/2023 vi466,00
1514/01/2023 sá245,00
1615/01/2023 do421,00
1716/01/2023 lu456,00
1817/01/2023 ma146,00
1918/01/2023 mi112,00
Hoja1
Cell Formulas
RangeFormula
E2E2=SUM((A2:A10000>TODAY()-180)*(WEEKDAY(A2:A10000,2)<6)*C2:C10000)/SUM((A2:A10000>TODAY()-180)*(WEEKDAY(A2:A10000,2)<6))
Hi,
This worked just as I wanted. Thank you.
I also like the pivot table idea. I will try that as well.
Thanks again everyone!
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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