View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ken D
 
Posts: n/a
Default Username & Date/Time Stamp

I've created the following code to record Username and a Date/Time
Stamp in cells K1 & L1 (respectively) after a user makes any change to
a cell in the same row (A1 through J1).

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Range("A1:J1"), Target) Is Nothing Then Exit Sub
Range("K1").Formula = Format(User())
Range("L1").Formula = Format(Now(), "dd-mmm-yyyy hh:mm:ss am/pm")
End Sub

I need to repeat this code for approx 50 rows. Any advice on the most
efficient way to handle this is greatly appreciated.

Thanks,
Ken