Entering Time

L

LP

Is there any way to enter time without the colon and
formatting to have the colon inserted?
 
D

Don Guillett

right click on sheet tab>view code>insert this>save workbook
your time must be entered with FOUR digits: 0525, 1450, etc

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column = 4 Then
On Error GoTo endit
Application.EnableEvents = False
Target = Left(Target, 2) & ":" & Right(Target, 2)
End If
endit:
Application.EnableEvents = True
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top