NOTE TO MODERATORS: I KNOW the Code element below is not in echelons. if I put them in. your SUCURI Firewall blocks the post! If someone can explain how to get round this I would be extremely grateful.
Going round in circles here, so hope someone can help.
User enters the number of worksheets to be created.
Macro creates that number of sheets, and names each one as "(whatever) & i" (where i is the current number created).
Macro then adds a column to the SUMMARY sheet for each new sheet created.
Works perfectly
Challenge: Each worksheet will be filled in, creating a series of subtotals.
I need VBA to produce "formulae" on the SUMMARY sheet that link to the relevant worksheet and cell range automatically, even if the User change the sheet name at some point
I tried setting each new sheet as "ws3" when it was created and used that in the "formulae" (e.g
Range("C6").Select
ActiveCell = "=" & sh3.Name & "!F6:F9"
But every time the Code adds a new sheet, sh3 becomes the new "Active" sheet, which changed the formulae on all the previous columns.
Any suggestions. pointers or alternatives welcome as ever.
Ochimus
Bookmarks