J
JB Bates
I am trying to figure out how to enter military time into a spreadsheet and
not have to manually enter the colon. I am using Vista as an operating
system and Excel 2007
EX enter 1330
it appears in cell as 13:30
In a previous post I saw a response that said to do the following:
"Preformat the column as time and try this.
Right click sheet tab>view code>insert this
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 5 Then Exit Sub
Application.EnableEvents = False
Target = Left(Target, 2) & ":" & Right(Target, 2)
Application.EnableEvents = True
End Sub"
I tried this and it does not work - don't know if it is a Vista issue. Any
help is GREATLY appreciated!!
Jennifer
not have to manually enter the colon. I am using Vista as an operating
system and Excel 2007
EX enter 1330
it appears in cell as 13:30
In a previous post I saw a response that said to do the following:
"Preformat the column as time and try this.
Right click sheet tab>view code>insert this
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 5 Then Exit Sub
Application.EnableEvents = False
Target = Left(Target, 2) & ":" & Right(Target, 2)
Application.EnableEvents = True
End Sub"
I tried this and it does not work - don't know if it is a Vista issue. Any
help is GREATLY appreciated!!
Jennifer