Try:
![]()
Sub Copy_Data() Dim ws1 As Worksheet: Set ws1 = Sheets("Input Sheet") Dim ws2 As Worksheet: Set ws2 = Sheets("Output Sheet") Dim x As String Dim rCell As Range x = "FILL" For Each rCell In ws1.Range("A1:A" & ws1.Range("A" & Rows.Count).End(xlUp).Row) If rCell.Value = x Then ws1.Range("B" & rCell.Row, "G" & rCell.Row).Copy Destination:=ws2.Range("A" & Rows.Count).End(xlUp).Offset(1) End If Next rCell End Sub
Bookmarks