Private Function DecToHHMM(NumVal As Single)
Dim HH As String
Dim MM As String
NumVal = 23.5
HH = Int(NumVal)
MM = Int(60 * ((NumVal / 1) - Int(NumVal)))
DecToHHMM = Format(HH & ":" & MM, "hh:mm")
End Function
I'm sure you could have found an answer to this with a bit of effort. Read up on how dates are stored - this site is full of information in many threads. All you need is CDate(3.75/24).
Enjoy,
Tony
-------------------------------------------------------------------------------------------- We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.