Forum Discussion

Overtime's avatar
Overtime
Copper Contributor
Mar 15, 2022
Solved

Angles

Good day all Does anyone know how to convert an angle (or time) into a decimal format and then visa versa
  • HansVogelaar's avatar
    HansVogelaar
    Mar 15, 2022

    Overtime 

    Are you sure that you copied and edited the formula correctly?

    For cells in which you enter a value such as 30.30.3: either format the cells as text before entering data, or prefix the values with an apostrophe ' to force Excel to treat them as text.

     

    I have attached a sample workbook with two VBA functions: DMS2Dec and Dec2DMS. You can view them by pressing Alt+F11.

    (Remark: VBA only works in the desktop version of Excel for Windows or Mac OSX, not in Excel for Android or iOS, nor in the online/browser version of Excel)

     

    The workbook is a macro-enabled workbook (.xlsm), so you'll have to allow macros when you open it.

Resources