Advertisement
Guest User

Untitled

a guest
May 31st, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2. Dim strAddress As String
  3. Dim val
  4. Dim dtmTime As Date
  5. Dim Rw As Long
  6. Dim x As String
  7.  
  8. Sheets("Shipment").Select
  9.  
  10. If Intersect(Target, Range("D3:D200,K3:K200")) Is Nothing Then Exit Sub
  11.  
  12. dtmTime = Now()
  13. val = Target.Value
  14. strAddress = Target.Address
  15. x = Cells(2, Target.Column).Value
  16.  
  17. Rw = Sheets("Log Sheet").Range("A" & Rows.Count).End(xlUp).Row + 1
  18. With Sheets("Log Sheet")
  19. .Cells(Rw, 1) = strAddress
  20. .Cells(Rw, 2) = val
  21. .Cells(Rw, 3) = dtmTime
  22. .Cells(Rw, 4) = x
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement