Hi Guys,
I want a code that moves a whole row from one tab to another when there is the word done in row L. This would run on the press of a button.
I have the below code, just not sure exactly how to adapt it to delete the row
Any help would be greatly appreciated. Thanks in advance!
I want a code that moves a whole row from one tab to another when there is the word done in row L. This would run on the press of a button.
I have the below code, just not sure exactly how to adapt it to delete the row
VBA Code:
Sub CopyDone()
Dim c As Range
Dim j As Integer
Dim Source As Worksheet
Dim Target As Worksheet
Set Source = ActiveWorkbook.Worksheets("Main Tab")
Set Target = ActiveWorkbook.Worksheets("Done")
j = 2
For Each c In Source.Range("L2:L1000")
If c = "Done" Then
Source.Rows(c.Row).Copy Target.Rows(j)
j = j + 1
End If
Next c
End Sub
Any help would be greatly appreciated. Thanks in advance!