aleksandra123
New Member
Hi Guys,
I developed a macro however I am still struggling with pasting into the first visible cell.
Here is my macro. The problem is: The macro doesn't recognize the first blank filtered row but pasts the row into the first blank row. However, a table, where macro pastes row, is always filtered.
Any suggestions?
Thanks a lot !
I developed a macro however I am still struggling with pasting into the first visible cell.
Here is my macro. The problem is: The macro doesn't recognize the first blank filtered row but pasts the row into the first blank row. However, a table, where macro pastes row, is always filtered.
Code:
Sub cpline()
Dim rngFilt As Range
With ActiveSheet
Set rngFilt = Application.Intersect(.AutoFilter.Range.Offset(1).SpecialCells(xlCellTypeVisible), .Range("A:AB"))
End With
rngFilt.Copy
Sheets("xx").Range("B" & Rows.Count).End(xlUp).Offset(1).PasteSpecial xlPasteValues
End Sub
Thanks a lot !