Hello,
I got help on this a bit earlier, but right now a new problem has cropped up. I can insert lines fine, but the problem is that now I want the worksheet to be able to delete rows without inputting time stamps. It can insert them with no problems. I have attached the file on as well.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Long
If Not Intersect(Target, Range("H2:H2000")) Is Nothing Then
Application.EnableEvents = False
On Error Resume Next
For Each cell In Intersect(Target, Range("H2:H2000"))
cell.Offset(0, -2) = Format(Now(), "HH:MM AM/PM")
cell.Offset(0, -3) = Format(Now(), "MM/DD/YY")
Next cell
End If
If Target.Columns.Count = Columns.Count Then
For r = 1 To Target.Rows.Count
Cells(Target(1).Row - 1, "C").Copy Cells(Target(1).Row + r - 1, "C")
Cells(Target(1).Row - 1, "D").Copy Cells(Target(1).Row + r - 1, "D")
Cells(Target(1).Row - 1, "I").Copy Cells(Target(1).Row + r - 1, "I")
Cells(Target(1).Row - 1, "J").Copy Cells(Target(1).Row + r - 1, "J")
Cells(Target(1).Row - 1, "K").Copy Cells(Target(1).Row + r - 1, "K")
Next r
End If
Application.EnableEvents = True
End Sub
Thanks for your help
Bookmarks