Hi guys,
I am currently making a tracker so that I can track my tasks each day. Is it possible to transfer the completed tasks to another sheet?
I have a simple sheet from A to K with K as the column where I put the drop down if its completed or not. It works if I use a drop down but I want it to be automatic. like if A to J has value then it will automatically transfer the row to another sheet. Here is a code I found online but I am getting error when I want it to be automatically transfer A to J granting that they will have values.
Private Sub Worksheet_Change(ByVal Target As Range)
'Version 2
If Not Intersect(Target, Range("K:K")) Is Nothing Then
If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
Dim Lastrow As Long
Lastrow = Sheets("Sheet2").Cells(Rows.Count, "B").End(xlUp).Row + 1
If Target.Value = "YES" Then
Rows(Target.Row).Copy Destination:=Sheets("Sheet2").Rows(Lastrow)
Rows(Target.Row).Delete
End If
End If
End Sub
Bookmarks