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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
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,217,037
Messages
6,134,140
Members
449,861
Latest member
DMJHohl

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