Trying to get this code to work, had a previous answer but did not work. Wanted to post another question so that I could submit my workbook to show that I'm entering it correct or not?
I have an attachment that I asked a previous question about how to return the user that is editing that Row and place it in Column Q. I also want to return the date and time stamp like in your last video in Row O and P. (My data will be in Cell Range A2:J1500)
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("A2:J1500")
'Check if the changed cell is in the data tabe or not.
If Intersect(Target, myTableRange) Is Nothing Then Exit Sub
'Column for the date/time
Set myDateTimeRange = Range("P" & Target.Row)
'Column for last updated date/time
Set myUpdatedRange = Range("O" & Target.Row)
'Stop events from running
Application.EnableEvents = False
'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
'Update cell with username - 1 = Column A; 2 = Column B; etc.
Cells(Target.Row, 17).Value = Application.UserName
'Turn events back on
Application.EnableEvents = True
End Sub