How to convert time to decimal format automatically...

  • Thread starter Thread starter alek23
  • Start date Start date
A

alek23

sorry for the late respond cause i'm a little bit busy, well...it's
working and its great, but how can i do that from A1 to A200 (it just
an example) to convert time to decimal automatically. thanks for fast
and great answer!
 
To convert times entered in column A, change J.E.'s code so it checks
the target column, instead of the target address:

'===================
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count > 1 Then Exit Sub
If .Column = 1 Then
If InStr(.NumberFormat, ":") Then
Application.EnableEvents = False
.Value = .Value * 24
.NumberFormat = "General"
Application.EnableEvents = True
End If
End If
End With
End Sub
'=========================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top