PC Review


Reply
Thread Tools Rate Thread

Copy / Insert n Rows of data simultaneously to 3 worksheets, same workbook

 
 
u473
Guest
Posts: n/a
 
      26th Jul 2011
Example :
1. Prompt for the number of rows to insert from mouse pointer.
2. If mouse pointer is on Row 5 on Sheet 1
Link Sheets 1, 2 and 3
Copy simultaneously All Row 4 (Format & Formulas) from Sheet1, 2
and 3
3. Insert the number of copies to insert from Row 4 in Sheets 1, 2 and
3
to Row 5 in same Sheets.
4. Unlink Sheets 1, 2 and 3
Help appreciated.
J.P.
 
Reply With Quote
 
 
 
 
New Member
Join Date: Jul 2011
Posts: 20
 
      27th Jul 2011
It would be wrong to group (or 'link') the sheets.

Bernie

Sub TestMacro()
Dim i As Integer
Dim r As Long
Dim j As Integer
r = ActiveCell.Row
i = InputBox("How many copies?")
For j = 1 To 3
Sheets("Sheet" & j).Rows(r).Copy
Sheets("Sheet" & j).Rows(r + 1).Resize(i).Insert
Next j
End Sub
 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      27th Jul 2011
On Jul 26, 3:12*pm, u473 <u...@aol.com> wrote:
> Example :
> 1. Prompt for the number of rows to insert from mouse pointer.
> 2. If mouse pointer is on Row 5 on Sheet 1
> * * Link Sheets 1, 2 and 3
> * * Copy simultaneously All Row 4 (Format & Formulas) from Sheet1, 2
> and 3
> 3. Insert the number of copies to insert from Row 4 in Sheets 1, 2 and
> 3
> * * to * Row 5 in same Sheets.
> 4. Unlink Sheets 1, 2 and 3
> Help appreciated.
> J.P.


Why? Is this homework?
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Indicating Rows to Repeat At Top on all Worksheets Simultaneously Gord Dibben Microsoft Excel Worksheet Functions 0 24th May 2008 12:49 AM
Re: Indicating Rows to Repeat At Top on all Worksheets Simultaneously Dave Peterson Microsoft Excel Worksheet Functions 0 23rd May 2008 08:03 PM
macro for copy data from all worksheets of a workbook to single sh =?Utf-8?B?c2FuZA==?= Microsoft Excel Misc 2 14th Jul 2007 05:54 AM
Button to insert rows on mutiple worksheets and copy text and info =?Utf-8?B?Y2h1Y2tfZ2FsZGE=?= Microsoft Excel Programming 1 1st Jun 2007 07:51 PM
sharing rows of data across multiple worksheets within a workbook =?Utf-8?B?ZGVlZGxlOTM=?= Microsoft Excel Worksheet Functions 2 18th Aug 2005 01:24 AM


Features
 

Advertising
 

Newsgroups
 


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