So I have this code that enters a date and time stamp if i enter any thing in the corresponding C cell. But however, with the current code i can do it ony one cell at a time.
Is there any way to do this for a range ? like select multiple cells and stamp multiple corresponding Cell C in one shot ?
Private Sub Worksheet_Change(ByVal Target As Range)
'Timestamp Data
' TeachExcel.com
Dim myTableRange As Range
Dim myDateTimeRange As Range
'Dim myUpdatedRange As Range
'Your data table range
Set myTableRange = Range("C3:C3333")
'Check if the changed cell is in the data tabe or not.
If Intersect(Target, myTableRange) Is Nothing Then Exit Sub
'Stop events from running
Application.EnableEvents = False
'Column for the date/time
Set myDateTimeRange = Range("B" & Target.Row)
'Column for last updated date/time
'Set myUpdatedRange = Range("F" & Target.Row)
'Determine if the input date/time should change
If myDateTimeRange.Value = "" Then
myDateTimeRange.Value = Now
End If
'Update the updated date/time value
'myUpdatedRange.Value = Now
If IsEmpty(Target.Value) Then
myDateTimeRange.Value = ""
'myUpdatedRange.Value = ""
End If
'Turn events back on
Application.EnableEvents = True
End Sub
••••ˇˇˇˇ