Hey Guys,
I have this macro added to the code on the worksheet that does the following:
Basically if on column 21 you type Yes, the whole row is copied on sheet "Extract" on the first available row.
However on Sheet "Extract" it turned out I need to have additional columns. How do I modify the macro to copy the row only up to column 20 (including column 20)?Private Sub Worksheet_Change(ByVal Target As Range) Dim a As Long Dim b As Long If Target.Count > 1 Then Exit Sub If Len(Target.Value) = 0 Then Exit Sub a = Target.Row If IsEmpty(Cells(a, 21)) Then Exit Sub If Cells(a, 21).Value = "Yes" Then Rows(a).Copy b = Sheets("Extract").UsedRange.Rows.Count + 1 Sheets("Extract").Cells(b, 1).PasteSpecial End If End Sub
Thank you!
Bookmarks