• 0

Solved Convert Milliseconds To Seconds On The Fly In Excel

  • 0

In Excel 2010, how can I convert milliseconds to seconds (ss.00) on the fly as I type the data into the specific cells?

123456 milliseconds = 123.55 seconds




1 Answer

  1. Without a macro, just use put a conversion formula in another column.

    Otherwise, you’ll need a Worksheet_Change macro that will monitor changes made to the cells and replace what is manually entered with the converted value.

    This will perform the conversion on any number entered in Column A:

    Private Sub Worksheet_Change(ByVal Target As Range)
     Application.EnableEvents = False
      If Target.Column = 1 Then
       If IsNumeric(Target) Then
        Target = Target / 1000
       End If
      End If
     Application.EnableEvents = True
    End Sub

    Click Here Before Posting Data or VBA Code —> How To Post Data or Code.

    • 0