PDA

View Full Version : Format Cell For Time



Mattster2020
10-01-2009, 08:53 AM
Afternoon All,

I am using the below formula in MS Access 2000 to format a number, say 120, and display it in time format.

=[Refresher]\60 & Format([Refresher] Mod 60,"\:00")

Is there a similar formula in Excel that can do the same?

Regards,

Matt

mdmackillop
10-01-2009, 09:40 AM
Sub tim()
With Range("A1")
.Value = Now
.NumberFormat = "hh"":00"""
End With
End Sub

mdmackillop
10-01-2009, 09:46 AM
Or using your formula

Sub tim2()
Dim Refresher
Refresher = 120
Range("A2") = Refresher \ 60 & Format(Refresher Mod 60, "\:00")
End Sub

Bob Phillips
10-01-2009, 10:40 AM
=TEXT(A7/60/24,"hh:mm")