Try this.
Add following code to Standard module.
Function GetBottomLeft(NamedRange As String) As String
With Range(NamedRange)
GetBottomLeft = .Cells(1, 1)(.Rows.Count).Address
End With
End Function
Then in Sheet module.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Target = vbNullString Then Exit Sub
If Not Intersect(Target, Range("C10:C500")) Is Nothing Then
With Sheets("TO.")
If IsError(Application.Match(Target.Value, .Range("ABD"), 0)) Then
.Range(GetBottomLeft("ABD")).End(xlUp).Offset(1) = Target.Value
End If
End With
With Sheets("TOTAL")
If IsError(Application.Match(Target.Value, .Range("ABE"), 0)) Then
.Range(GetBottomLeft("ABE")).End(xlUp).Offset(1) = Target.Value
End If
End With
End If
End Sub
Bookmarks