Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 114
Default Duplicate procedure in other sheets

What is the best way to duplicate a row insertion in other sheets of a
workbook.

Let me explain by example.

There are 5 sheets in the workbook

Sheet1!

a row is added at R12
A12:G12 are copied from the cell range immediately above

Sheet2! - Sheet5!

These sheets will need the same procedure carried out at R12

Hope someone has the answer. Thank you.

  #2   Report Post  
Posted to microsoft.public.excel.programming
MRT MRT is offline
external usenet poster
 
Posts: 26
Default Duplicate procedure in other sheets

when you add and copy at the sheet1, select all sheets.
(under selecting Sheet1 condition, Shift + Ctrl + PgDn )

HTH
if i have false conception, pls forgive and forget.
--
MRT

"Gotroots" wrote in message ...
What is the best way to duplicate a row insertion in other sheets of a
workbook.

Let me explain by example.

There are 5 sheets in the workbook

Sheet1!

a row is added at R12
A12:G12 are copied from the cell range immediately above

Sheet2! - Sheet5!

These sheets will need the same procedure carried out at R12

Hope someone has the answer. Thank you.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Duplicate procedure in other sheets

See if this does what you want:

Sub insrtRw()
Dim sh As Worksheet
For Each sh In ActiveWorkbook.Sheets
sh.Rows(12).Insert
sh.Range("A11:G11").Copy sh.Range("A12")
Next
End Sub

Open the VBE, Alt + F11, and copy/paste the code into the code window. If
the window is dark, then from the VBE menu bar InsertModule, then
copy/paste the code. You can run the code from Excel with
ToolsMacroMacros then select this macro name and click run.




"Gotroots" wrote in message
...
What is the best way to duplicate a row insertion in other sheets of a
workbook.

Let me explain by example.

There are 5 sheets in the workbook

Sheet1!

a row is added at R12
A12:G12 are copied from the cell range immediately above

Sheet2! - Sheet5!

These sheets will need the same procedure carried out at R12

Hope someone has the answer. Thank you.



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
Run a procedure in all the sheets of the workbook. Heera Excel Programming 1 November 21st 08 03:43 PM
i want duplicate sheets EWalters Excel Worksheet Functions 1 February 18th 08 01:18 PM
Code Procedure for multiple sheets AMY Z. Excel Programming 2 August 17th 07 10:54 PM
duplicate sheets LaurieB Excel Discussion (Misc queries) 4 April 20th 06 01:59 AM
Sort Sheets Procedure Sandman[_2_] Excel Programming 5 April 28th 04 04:37 PM


All times are GMT +1. The time now is 06:14 AM.

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

About Us

"It's about Microsoft Excel"