Thread: Time Format
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 390
Default Time Format

IT works perfect but I need this from cell A7 to A68.

"Stefi" wrote:

You need an event macro for that:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 10 Then 'change column No as necessary
Application.EnableEvents = False
ora = Int(Target.Value / 100)
perc = Target.Value - ora * 100
Target.Value = TimeSerial(ora, perc, 0)
Application.EnableEvents = True
End If
End Sub

This one works for column J (column 10).
Post if you need help to install it!

--
Regards!
Stefi



€˛MAX€¯ ezt Ć*rta:

Hello

I have a worksheet where one of the columns is TIME. All I want is that I
write 0315 (3.15 AM) and it appears as 03:15. Is there a solution for this?

Thanks in advance.