Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cel As Range, targ As Range, InputCells As Range
Dim hr As Integer, min As Integer
Set InputCells = Range("A:A") 'Change to the cells that you'll be inputting time into
Set targ = Intersect(Target, InputCells)
If targ Is Nothing Then Exit Sub
Application.EnableEvents = False
On Error Resume Next
For Each cel In targ
If IsNumeric(cel) Then
hr = Left(cel, Len(cel) - 2)
min = Right(cel, 2)
cel = TimeSerial(hr, min, 0)
cel.NumberFormat = "[$-409]h:mm AM/PM;@"
End If
Next cel
On Error GoTo 0
Application.EnableEvents = True
End Sub