1. 'Private Sub Worksheet_Change(ByVal Target As Range)
  2. Dim rng1, rng2 As Range
  3. Set rng1 = Intersect([F35:F52], Target)
  4. If rng1 Is Nothing Then Exit Sub
  5. ActiveSheet.Unprotect "password"
  6. Application.EnableEvents = False
  7. [H8] = Format(Now(), "dd/mm/yyyy hh:mm:ss")
  8. Application.EnableEvents = True
  9. ActiveSheet.Protect DrawingObjects:=False, Password:="password"
  10. End Sub
  11. Set rng2 = Intersect(H35:H52], Target)
  12. If rng2 Is Nothing Then Exit Sub
  13. ActiveSheet.Unprotect "password"
  14. Application.EnableEvents = False
  15. [H9] = Format(Now(), "dd/mm/yyyy hh:mm:ss")
  16. Application.EnableEvents = True
  17. ActiveSheet.Protect DrawingObjects:=False, Password:="password"
  18. End Sub