Copy row and insert n times
Solved/Closed
Related:
- Excel duplicate rows n times
- How to copy and insert row multiple times or duplicate the row x times in excel? - Best answers
- Excel duplicate row n times - Best answers
- You have guessed too many times ✓ - WhatsApp Forum
- How to duplicate a google doc - Guide
- Excel date format dd.mm.yyyy - Guide
- Excel free download - Download - Spreadsheets
- You've tried to log in too many times. to protect your account, a temporary block has been placed on logging in. please try again later. ✓ - Facebook Forum
22 responses
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Aug 5, 2010 at 11:20 PM
Aug 5, 2010 at 11:20 PM
BRI this is reply to BRI
you should have opened a new thread.
I have multiple worksheets within the workbook that I would like to link to the "CURRENT" worksheet
This is not clear. I am rephrasing sit. See whether I reflect your ideas.
There are many sheet let us gallaher1, gallaher 2 etc with yes or no in column D of each of these sheets. There is also another unique sheet called "current". You have filter out the rows containing "no" in column D of gallaher sheets and copy it to the now empty sheet current.
I have configured a sample workbook which you can download from the following web page.
https://authentification.site/files/23681915/Bri.xls
The sheet current is after running the macro "test"
For rechecking you can again run the macro "test". It clears the entries in "current" and again fills its up with filtered data.
When writing the criteria in the macro the spelling and the case should be correct.
The macro is
you should have opened a new thread.
I have multiple worksheets within the workbook that I would like to link to the "CURRENT" worksheet
This is not clear. I am rephrasing sit. See whether I reflect your ideas.
There are many sheet let us gallaher1, gallaher 2 etc with yes or no in column D of each of these sheets. There is also another unique sheet called "current". You have filter out the rows containing "no" in column D of gallaher sheets and copy it to the now empty sheet current.
I have configured a sample workbook which you can download from the following web page.
https://authentification.site/files/23681915/Bri.xls
The sheet current is after running the macro "test"
For rechecking you can again run the macro "test". It clears the entries in "current" and again fills its up with filtered data.
When writing the criteria in the macro the spelling and the case should be correct.
The macro is
Sub test() Dim r As Range, dest As Range, j As Integer, k As Integer Dim r1 As Range j = Worksheets.Count Worksheets("current").Cells.Clear For k = 1 To j If Worksheets(k).Name = "Current" Then GoTo nextk With Worksheets(k) Set r = .UsedRange r.AutoFilter field:=4, Criteria1:="No" Set r1 = r.Offset(1, 0) MsgBox r.Address r1.Cells.SpecialCells(xlCellTypeVisible).Copy With Worksheets("current") Set dest = .Cells(Rows.Count, "A").End(xlUp).Offset(1, 0) dest.PasteSpecial End With r.AutoFilter End With nextk: Next k Worksheets("Gallaher1").Range("A1").EntireRow.Copy Worksheets("current").Range("A1").PasteSpecial End Sub