entering times [format]

  • Thread starter Thread starter Ron.Winkley
  • Start date Start date
R

Ron.Winkley

Hi to All,

I have a time and event tracking workbook in which math and db
functions are used to produce various timing and activity statistics.
For convenience I would like to enter times without typing the colon
separator between hh:mm

for example, is there a way I could type 1020 instead of 10:20?
of course all the formulae still need to work and it would be
nice if the display could also appear as 10:20

Thank you,

RonW
 
A big thanks to you Martin and to Chip,

It works! but, and i know this may be beyond the scope of the usenet
group, but -
- for example i entered 1230 and i get 12:30:00 which is correct,
however, i would like the cell to display only 12:30 without having to
reformat anything
probably a simple edit somewhere in the vba code would take care of
that,
and i could "tinker' with it, but if any further guidance is possible,
then i would
really appreciate it . . .

thanks again,

RonW.
 
Hi Ron,

No need to tweak the code, just format your cells
as you normally would.
In your case sounds like custom hh:mm is what you need.

HTH
Martin
 
I'm not the best VBA programmer but changing this line seems to work ok:

..Value = TimeValue(TimeStr)

Change to:

..Value = Format(TimeValue(TimeStr), "h:mm")

It will still display in the *formula bar* as h:mm:ss
 
Back
Top