Need Macro to insert rows and formulas into multiple pages of workbook template

lfh

New member
Joined
Aug 29, 2015
Messages
2
Reaction score
0
Points
0
Location
Canada
I need assistance with writing a macro for an Excel workbook template with multiple sheets and the existing macros are hardcoded with nInit = , nMin = and nMax = rows (referencing size of areas for entering data) and static header and footer row references. I'm concerned that when adding a row I will corrupt what is already hardcoded? I want to be able to insert row(s) as needed, and have it fill the new row with existing formulas, on all worksheets. Each worksheet is sharing common information, but reporting with different formulas and displaying a different number of rows/columns. I've read that I need to do a loop macro, but am very new to VBA and usually rely on the recorder, but when I used it I ended up with code that didn't work well. In the existing macros I can see the following:


SheetAT = 16 to 138
sSheetAR = 15 to 137
sSheetAE = 16 to 138
sSheetCT = 12 to 134
sSheetRT = 9 to 131
sSheetAC = 16 to 137

There are also ranges for Sub-Totals, Totals, Unprotect/Protect file, etc., so I'm concerned how to add rows without negatively impacting these.

Any help would be appreciated.
 
Back
Top