Time Format
Try the below..Modify the range to suit your requirement
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Range("A1:A10")) Is Nothing Then
If IsNumeric(Target.Value) Then
Application.EnableEvents = False
Target = Left(Format(Target.Value, "0000"), 2) & ":" &
Right(Format(Target.Value, "0000"), 2)
Application.EnableEvents = True
End If
End If
End Sub
--
Jacob
"MAX" wrote:
Hello
I have a worksheet where one of the columns is TIME. All I want is that I
write 0315 (3.15 AM) and it appears as 03:15. Is there a solution for this?
Thanks in advance.
|