Have succeeded to make code to insert 1,3 or 5 rows of copies of the active row - below the active row. However it does not work when the filter is on.
I have a sheet with Week, Employee number, data - sorted by employee number. Filtered on one employee.
Now, I would like to copy the row I am marking and insert x number of rows below - and "stay on the activerow" - even though I have to do whatever gymnastics to remove and add filter... I hope and trust there is another way.
I have found the "SpecialCells(xlCellTypeVisible)" but cannot seem to place it coorectly - it inserted 5 rows in the top of my sheet :-)
I hope someone can help... My code looks like this
Sub Insert5Rows()
Dim xcount As Integer
xcount = 5
ActiveCell.EntireRow.Copy
Range(ActiveCell.Offset(1, 0), ActiveCell.Offset(xcount, 0)).EntireRow.Insert Shift:=xlDown
Application.CutCopyMode = False
End Sub
Thanks a bunch in advance!!!