I have some code originally modifed from here. When there is a C in the first column of a row that row is deleted and saved in another sheet. It's for a todo list applicaiton.
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
' Code goes in the Worksheet specific module
Dim rng As Range
' Set Target Range
Set rng = Target.Parent.Range("A1:A200")
' Only look at single cell changes
If Target.Count > 1 Then Exit Sub
' Only look at that range
If Intersect(Target, rng) Is Nothing Then Exit Sub
' Action if Condition(s) are met
Select Case Target.Text
Case "C"
Target.EntireRow.Copy Sheets("Completed").Cells(Rows.Count, "A").End(xlUp).Offset(1)
Target.EntireRow.Delete
End Select
End Sub
The code works wonderfully on Excel 2010 but fails with this error:
Run time error '1004' "Copy Method of Range Class Failed"