Hello, I posted this question before but I don't think I did a good job of explaining it. Sorry about that. here goes again.
Whenever a cell in range N30 to N(x) changes in a worksheet ab, I want the entire row copied to a new tab called "Audit". I also want a timestamp (YYYYMMDD HH:MM:SS AM/PM format) added so I know when the change occurred. I would like the timestamp to be the first column in the Audit tab. I would also like the data to be written to the first empty row in the Audit tab.
My code so far:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 14 Then Target.EntireRow.Copy Destination:=Sheets("Audit").Range("A" & Rows.Count).End(xlUp).Offset(1)
End Sub
Problems I am having:
1) The number 14 just refers to the column N. How do I make it N30 and higher?
2) What code so I use to put the timestamp in the first column?
Thank you in advance.
Steve
Whenever a cell in range N30 to N(x) changes in a worksheet ab, I want the entire row copied to a new tab called "Audit". I also want a timestamp (YYYYMMDD HH:MM:SS AM/PM format) added so I know when the change occurred. I would like the timestamp to be the first column in the Audit tab. I would also like the data to be written to the first empty row in the Audit tab.
My code so far:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 14 Then Target.EntireRow.Copy Destination:=Sheets("Audit").Range("A" & Rows.Count).End(xlUp).Offset(1)
End Sub
Problems I am having:
1) The number 14 just refers to the column N. How do I make it N30 and higher?
2) What code so I use to put the timestamp in the first column?
Thank you in advance.
Steve