2 Issues:
1) Am having trouble altering the column the time stamp is going in with the code below. Instead of result landing in Column B, would like column D. When I change the 2nd offset digit to 3 instead of 1 there is no change?
2) Would also like to have a 2 - 4 of these same activities occur for data entered into different ranges in the same worksheet. Have attempted to copy this & alter it to deal with the other ranges with no success. Assitance & Ideas appreciated.
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count > 1 Then Exit Sub
If Not Intersect(Range("A2:A10"), .Cells) Is Nothing Then
Application.EnableEvents = False
If IsEmpty(.Value) Then
.Offset(0, 1).ClearContents
Else
With .Offset(0, 1)
.NumberFormat = "dd mmm yyyy hh:mm:ss"
.Value = Now
End With
End If
Application.EnableEvents = True
End If
End With
End Sub
1) Am having trouble altering the column the time stamp is going in with the code below. Instead of result landing in Column B, would like column D. When I change the 2nd offset digit to 3 instead of 1 there is no change?
2) Would also like to have a 2 - 4 of these same activities occur for data entered into different ranges in the same worksheet. Have attempted to copy this & alter it to deal with the other ranges with no success. Assitance & Ideas appreciated.
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count > 1 Then Exit Sub
If Not Intersect(Range("A2:A10"), .Cells) Is Nothing Then
Application.EnableEvents = False
If IsEmpty(.Value) Then
.Offset(0, 1).ClearContents
Else
With .Offset(0, 1)
.NumberFormat = "dd mmm yyyy hh:mm:ss"
.Value = Now
End With
End If
Application.EnableEvents = True
End If
End With
End Sub