Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 358
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 661
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting Rows into multiple worksheets Andrew Excel Discussion (Misc queries) 2 January 15th 10 09:45 PM
inserting rows on multiple worksheets Sarah Excel Worksheet Functions 0 August 17th 07 02:12 AM
inserting rows on multiple worksheets roadkill Excel Worksheet Functions 0 August 17th 07 01:57 AM
Delete Blank Rows Code - Multiple Worksheets - Multiple Documents BenS Excel Discussion (Misc queries) 3 June 29th 07 12:20 AM
inserting rows on multiple worksheets katie Excel Programming 1 May 25th 04 11:16 AM


All times are GMT +1. The time now is 05:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"