Automatically update formulas

VickyOakman17

New Member
Joined
Jan 22, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I am trying to find a way in which I can add a new worksheet each month or every two months, to a workbook, and the formulas will automatically update to the previous worksheet.


For example I have a Jan 2023 worksheet but then add March 2023- I want to following formulas if possible to update to the 'Jan 2023' cells not the 'master' cells. Without me having to manually change them.

=SUM(K32-Master!K32) would now need to be =SUM(K32-'Jan 2023'!K32)


Is this possible to do using a macro or VBA.
 

Attachments

  • Excel.jpg
    Excel.jpg
    150.9 KB · Views: 9

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
try this
------------------------

create a sheet or somewhere for a list of all the sheet names to be

define name and put the following into the refers to field:
=replace(get.workbook(1),1,find("]",get.workbook(1)),"")

Book1
ABCDEFG
1Sheet NumberSheet Name21
21Sheet ListResult5
32Dec 22
43Jan 23
54Feb 23
65Mar 23
76Apr 23
87May 23
98June 23
109July 23
Sheet List
Cell Formulas
RangeFormula
A2:A10A2=IF(ROW()-1<=COUNTA(IFERROR(INDEX(SheetList,C1),"")),ROW()-1,"")
B2:B10B2=IFERROR(INDEX(SheetList,A2),"")
G2G2=SUM(G1-INDIRECT("'"&VLOOKUP(MAX(A:A),A:B,2)&"'"&"!"&"h1"))
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,264
Members
449,075
Latest member
staticfluids

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