Change cell if wrong time entered
Hi Mark,
Am Wed, 7 Feb 2018 02:34:41 -0800 (PST) schrieb Living the Dream:
It's only ever one time extension that makes life miserable, anything with a 00:45, for example, if I want 09:45, I tend to enter it as 09:54.
<snipped
1. get the right syntax
2. change it so that I can insert it behind the sheet and use the SheetChange(ByVal)
try:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("AB6:AE250")) Is Nothing _
Or Target.Count 1 Then Exit Sub
If Minute(Target) = 54 Then Target = TimeSerial(Hour(Target), 45, 0)
End Sub
Regards
Claus B.
--
Windows10
Office 2016
|