Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting multiple rows in multiple worksheets
I am trying to develop a worksheet where a number of worksheets are linked to
a master worksheet. The sheets that are linked to the master have similar formatting ie; alternate rows are shaded & there are formulas, eg; sheet 1 is master, sheet 2 has blue rows, sheet 3 has green rows, sheet 4 has yellow rows, etc. My dilemma is this: The master sheet is protected & not meant for editing, only calclating & displaying totals. So what i would like to do is if i add a row (with formatting) in sheet 2 it will automatically add to the master sheet, if i add row(s) to sheet 3, it will automatically update in the master sheet and so on. The real problem lies in that fact that i might insert a row above row #25 on sheet 2 but the corresponding row on the master sheet may be row # 175, & Sheet 3 row #85 = Master sheet row #250 I currenlty have it set up so that data is entered on sheet 2(or whichever sheet) & it is automatically updated to the master sheet (simple equal cells). I dont know if this is possible or probable but any help appreciated. I might also add that i've only started exploring vba concepts so may not be familar with lingo. Thanks in advance for any help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting multiple rows in multiple worksheets
You could name a range on each sheet being the first row of the standard
structure, then calculate where to insert the rows based on the offset from that range : nOffset = selection.row - Range("Sheet1_Top_Row").Row ' This gives you the offset to use when inserting on each of the other sheets ' On the next sheet nNewRow = Range("Sheet2_Top_Row").Row + nOffset - 1 cells(nNewRow,1).entirerow.insert shift:=xldown -- If the post is helpful, please consider donating something to an animal charity on my behalf. "Andrew" wrote: I am trying to develop a worksheet where a number of worksheets are linked to a master worksheet. The sheets that are linked to the master have similar formatting ie; alternate rows are shaded & there are formulas, eg; sheet 1 is master, sheet 2 has blue rows, sheet 3 has green rows, sheet 4 has yellow rows, etc. My dilemma is this: The master sheet is protected & not meant for editing, only calclating & displaying totals. So what i would like to do is if i add a row (with formatting) in sheet 2 it will automatically add to the master sheet, if i add row(s) to sheet 3, it will automatically update in the master sheet and so on. The real problem lies in that fact that i might insert a row above row #25 on sheet 2 but the corresponding row on the master sheet may be row # 175, & Sheet 3 row #85 = Master sheet row #250 I currenlty have it set up so that data is entered on sheet 2(or whichever sheet) & it is automatically updated to the master sheet (simple equal cells). I dont know if this is possible or probable but any help appreciated. I might also add that i've only started exploring vba concepts so may not be familar with lingo. Thanks in advance for any help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Inserting Rows into multiple worksheets | Excel Discussion (Misc queries) | |||
inserting rows on multiple worksheets | Excel Worksheet Functions | |||
inserting rows on multiple worksheets | Excel Worksheet Functions | |||
Delete Blank Rows Code - Multiple Worksheets - Multiple Documents | Excel Discussion (Misc queries) | |||
inserting rows on multiple worksheets | Excel Programming |