I want to use this code several times on the same sheet with different cells. I get an error saying Ambiguous name detected. I need to rename each differently? How would I change the name without stopping the code? Thanks
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
Set MyRange = Range("A2") 'edit to suit range of cells
If Not Intersect(Target, MyRange) Is Nothing Then
If Target < 0 Then
Target.Offset(0, 5) = Date
Else
Target.Offset(0, 5).ClearContents
End If
End If
End Sub