• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 798
  • Last Modified:

Excel: Formula to separate out hours minutes and seconds


I have a cell that has a value format like 0:00:30, (30 seconds). When I view the cell it shows 12:00:30 AM. It's a count down timer that is being used to fill in my textbox in a userform.  However, when I pass the value to my textbox it shows up as a value "3.47222222222222E-04".

It maybe because of the way I am passing it.  Here is the code
TimeLeft = Sheets("Event Management").Range("C8")

Or if that isn't the fix, then I was thinking I would some how separate the cell that has the formula as 0:00:30 and show 0 hours:0 minutes: and 30 seconds.  Something like that..

Any help is much appreciated.
Maliki Hassani
Maliki Hassani
1 Solution

pls try

TimeLeft = format(Sheets("Event Management").Range("C8"), "hh:mm:ss AM/PM")

Maliki HassaniAuthor Commented:
Good one.. I just pulled off the AM and PM  Thanks
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now