View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
Auric__ Auric__ is offline
external usenet poster
 
Posts: 538
Default Converting Numeral to Time equivalent

NoodNutt wrote:

It's an awesome little tidbit of code, and Claus was very generous in
his time in altering it to suit my needs also.


The man is an absolute machine when it comes to this stuff.

The original code didn't quite fit how I entered time after midnight
using [h]:mm format, so if someone finished @ "2:30am" I would enter
"26:30" instead, this way I don't need to worry about adding a date to
bridge times or those that work afternoon/night shift.


That's another problem that Claus solved for me, around the same time he
wrote the other code. See the thread "Formula than understands midnight?"
(yes, I typo'd "that", and I never even noticed until just now...) over in
mpew.functions:

https://tinyurl.com/y3cve9jx

Redirects to (watch the wordwrap):

https://groups.google.com/forum/#!
topic/microsoft.public.excel.worksheet.functions/aDkj8ab8iwY

It uses a worksheet formula, but it could be adapted to VBA.

I am wondering if you happened to experience this small anomaly. All but
one of the values I have entered have converted, except "600".

I have all the cells formatted as General, and every other time entered
has zero issue converting, so I'm stumped as to why "600" is converting
to "0:25". I know "0.25" is the represented value for "6:00" when it is
converted, so this is an interesting twist.

Claus, if by chance you're reading this, I also found this issue in the
example file you sent me.


The code I posted doesn't do this. (I just checked.) Post the code you're
using.

--
A blazing sun that never sets.