JILBO
09-09-2021, 10:36 AM
Howdi,
Have this code to Add the date and time into column C when the 'Change Number' cell is changed.
However i don't want this to update if there is already a date in column C...im stumped!
Hope you can help
Private Sub Worksheet_Change(ByVal Target As Range)Dim r As Range, Intersection As Range, cell As Range
Set r = Range("ChgTBL[Change Number]")
Set Intersection = Intersect(r, Target)
If Intersection Is Nothing Then Exit Sub
Application.EnableEvents = False
For Each cell In Intersection
Range("C" & cell.Row).Value = Date + Time
Range("D" & cell.Row).Value = Application.UserName
Next cell
Application.EnableEvents = True
End Sub
Have this code to Add the date and time into column C when the 'Change Number' cell is changed.
However i don't want this to update if there is already a date in column C...im stumped!
Hope you can help
Private Sub Worksheet_Change(ByVal Target As Range)Dim r As Range, Intersection As Range, cell As Range
Set r = Range("ChgTBL[Change Number]")
Set Intersection = Intersect(r, Target)
If Intersection Is Nothing Then Exit Sub
Application.EnableEvents = False
For Each cell In Intersection
Range("C" & cell.Row).Value = Date + Time
Range("D" & cell.Row).Value = Application.UserName
Next cell
Application.EnableEvents = True
End Sub