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

U

u473

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.
 
Joined
Jul 19, 2011
Messages
20
Reaction score
0
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
 
D

Don Guillett

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top