![]()
Sub ABCTESTABC() Const sh1 As String = "test" Const sh2 As String = "PIF" Dim rng As Range, c As Range, FoundCell As Range With Worksheets(sh2).Range("a1") With .CurrentRegion .AutoFilter Field:=8, Criteria1:="U" Set rng = .SpecialCells(xlCellTypeVisible) End With .AutoFilter End With With Worksheets(sh1) For Each c In rng.Rows If Not rng(c.Row, "f") = vbNullString Then Set FoundCell = .Range("f:f").Find(What:=rng(c.Row, "f")) If Not FoundCell Is Nothing Then c.EntireRow.Copy .Cells(FoundCell.Row, "a") End If End If Next End With Set rng = Nothing Set FoundCell = Nothing Set c = Nothing End Sub
How would I alter the above so when it pastes into sheet test it doesn't paste the whole row, instead it just pastes rows A to O ???
Bookmarks