Good morning everyone,
i have the following code but i would like to run this code for two different areas of the worksheet, ive tried different variations of this code but nothing worked so far.
Code
Private Sub Worksheet_Change(ByVal Target As Range)
'Timestamp Data
Dim myTableRange As Range
Dim myDateTimeRange As Range
Dim myUpdatedRange As Range
'Your data table range
Set myTableRange = Range("FB2:FD10000") '***Also what this range as well ("BI2:BL10000")
'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("FA" & Target.Row) '***Also what this ("BG" & Target.Row)
'Column for last updated date/time
Set myUpdatedRange = Range("FE" & Target.Row) '***Also what this ("BH" & 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
'Turn events back on
Application.EnableEvents = True
End sub
Display More