Automating a line item for several worksheets?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to automate a row with summary calculations for each worksheet that is
added to my workbook. Is there a macro that would enable me to add a row with
calculations for a series of worksheets? The worksheets will use the same
format, so that the data will be easily found. I intend to control where the
new worksheets are placed by ensuring they are placed between two hidden
worksheets.

Thanks.
 
I'm not sure I clearly understand the requirements, but try putting code
like this in the ThisWorkbook code module:

Private Sub Workbook_NewSheet(ByVal Sh As Object)
Sh.Range("A30:G30").FormulaR1C1 = "=SUM(R2C:R[-1]C)"
End Sub

Adjust the formula(s) to suit.
___________________________________________________________________
 
Back
Top