Hi
Can comeone please help? I have the below code to date stamp a cell in column AN only when a cell in column AB equals 0...the trouble is I would like this to work for the entire column without having to keep copy and pasting the code like I have below.
Also if there is any other number in column AB i want it to skip that row, not date stamp in column AB but move to the next row down?? Lastly, once the date stamp is in the relevant cell in column AN I never want it to overtype,
Any help would be greatly appreciated


I am currently using:
Private Sub Worksheet_Change(ByVal Target As Range)
Sheets("Performance Board").Unprotect "password"
If Intersect(Target, Range("AB8")) = 0 Then
If Range("AN8").Value <> "" Then Exit Sub
Application.EnableEvents = False
Range("AN8").Value = Now
Range("AN8").NumberFormat = "d dddd yyyy hh:mm:ss"
Application.EnableEvents = True
End If
If Intersect(Target, Range("AB9")) = 0 Then
If Range("AN9").Value <> "" Then Exit Sub
Application.EnableEvents = False
Range("AN9").Value = Now
Range("AN9").NumberFormat = "d dddd yyyy hh:mm:ss"
Application.EnableEvents = True
End If
If Intersect(Target, Range("AB10")) = 0 Then
If Range("AN10").Value <> "" Then Exit Sub
Application.EnableEvents = False
Range("AN10").Value = Now
Range("AN10").NumberFormat = "d dddd yyyy hh:mm:ss"
Application.EnableEvents = True
End If
Sheets("Performance Board").Protect "password"
End Sub
Bookmarks