Quick conversion of exported results to seconds

Document created by B-F-F08DRX Employee on Jul 19, 2017
Version 1Show Document
  • View in full screen mode

Method 1:


When you export a chart in CSV, the data is in MS, not seconds. Sometimes you want that information in seconds instead… so here’s a macro you can plug into Excel to change the values all at once for you.


Modify the Range value on line 5 (the “Set myRange = … line) to include the full range of cells you want to modify.


Sub ConvertToSeconds()

    Dim rangeCell As Range

    Dim myRange As Range


    Set myRange = ActiveSheet.Range("C2:H48")


    For Each rangeCell In myRange.Cells

        rangeCell.Value = rangeCell.Value / 1000

    Next rangeCell


End Sub



Method 2:


1. Just type 1000 in an empty cell and copy the cell in clipboard Ctrl + C (Windows)  or  Command + C (Mac)

2. Select all the values you want to convert them from milliseconds to seconds

3. Click  Edit - > Paste Special

4. Select  Divide radio button and click OK.