Hi All,
I searched the forums and i didnt see a topic like this so here it goes 
I am trying to program excel so that when someone enters a number the next cell will automatically enter the date and time. I figured it out for the first 2 columns but the subject error comes up for the next columns.
I am attaching the file just in case i screwed up my explanation 
Update: i actually did see a thread with this topic.. but im still confused
Thanks
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count > 1 Then Exit Sub
If Not Intersect(Range("A2:A30"), .Cells) Is Nothing Then
Application.EnableEvents = False
With .Offset(0, 1)
.NumberFormat = "dd mmm yyyy hh:mm:ss"
.Value = Now
End With
Application.EnableEvents = True
End If
End With
End Sub
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count > 1 Then Exit Sub
If Not Intersect(Range("D2:D30"), .Cells) Is Nothing Then
Application.EnableEvents = False
With .Offset(0, 1)
.NumberFormat = "dd mmm yyyy hh:mm:ss"
.Value = Now
End With
Application.EnableEvents = True
End If
End With
End Sub
Bookmarks