How to get AVERAGE of 3 previous sheets automatically when you create a new sheet

shahdelsol

Active Member
Joined
Jul 21, 2009
Messages
276
Office Version
  1. 365
Platform
  1. Windows
I am trying to get AVERAGE of 3 previous sheets of the same cells to the left of the last sheet on a workbook every time I am creating a new sheet. Can you do this by formula? I feel like you can't do this unless you manually update the formula each time you create a new sheet. Does anyone know if there is a way to do this by formula as it gets updated automatically when a new sheet created? If not how can this be done through VBA. Let's say I am looking for the average of L58 of the 3 previous sheets to the left of the last sheet.
I appreciate anyone who can help.
 
This looks better however I tried it and I got (#value) error . Did it work on your end? I am just curious otherwise no big deal I can still used your original formula.

Glad we could help. I was playing around and found a shorter version of the B2 formula:

=AVERAGE(SUBTOTAL(1,INDIRECT("'"&TEXT(EOMONTH(DATEVALUE(1&A2),{-1,-2,-3}),"mmm yyyy")&"'!L58")))
 
Last edited:
Upvote 0

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Please disregard. I had a typo and your shorter version of your formula works great. Thanks again!
This looks better however I tried it and I got (#value) error . Did it work on your end? I am just curious otherwise no big deal I can still used your original formula.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,242
Members
452,623
Latest member
russelllowellpercy

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