#1   Report Post  
Denise
 
Posts: n/a
Default Entering Times

I have a spread sheet where there are a lot of times that are entered. Is
there a way to format the cells so that when you type in the time you do not
have to use the shift key and the colon. I would like to be able to just type
in 1320 and the colon be inserted automatically.

Thanks.
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

You need code to translate it

Private Sub Worksheet_Change(ByVal Target As Range)


Application.EnableEvents = False
On Error GoTo ws_exit
If Target.Column = 8 Then
With Target
.Value = TimeSerial(.Value \ 100, _
.Value - (.Value \ 100) * 100, _
0)
End With
End If


ws_exit:
Application.EnableEvents = True
End Sub


'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.



--
HTH

Bob Phillips

"Denise" wrote in message
...
I have a spread sheet where there are a lot of times that are entered. Is
there a way to format the cells so that when you type in the time you do

not
have to use the shift key and the colon. I would like to be able to just

type
in 1320 and the colon be inserted automatically.

Thanks.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
entering times automaticly George Excel Discussion (Misc queries) 2 May 6th 05 04:18 PM
Charting and analyzing Times' times data for trends Johnny Excel Discussion (Misc queries) 1 May 5th 05 02:36 AM
Copy from worksheet to another x times Union70 Excel Discussion (Misc queries) 0 March 7th 05 10:03 PM
SUMPRODUCT ON TIMES Bob Phillips Excel Worksheet Functions 1 January 13th 05 06:28 PM
Adding/Averaging Times in Excel JD Excel Discussion (Misc queries) 2 January 5th 05 06:07 PM


All times are GMT +1. The time now is 03:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"