Share via

Excel formula

Anonymous
2019-11-05T18:51:27+00:00

In Excel, I used to use CONVERT_degree **(cell Number)**to convert a decimal angle into Degree, minutes and seconds. Is there a new way to convert this as my excel program has been migrated to a windows 10 machine with office 365 and doesn't seem to work anymore?

Many Thanks

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. Anonymous
    2019-11-06T13:38:57+00:00

    Thanks so much, working well. Yipee!

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2019-11-06T13:18:51+00:00

    To:  GordonTodd1

    re:  code supplied by MS

    The author of that code must be a member of the Windows10 coding group.

    Try this modified version of the code.

    Note: the function name has been changed.

    '---

    Public Function CONVERT_DEGREES(ByRef Decimal_Deg As Variant) As Variant

    'Revised 11/06/2019 - Nothing Left to Lose

    Dim Degrees As Double

    Dim Minutes As Double

    Dim Seconds As Double

      'Set degree to Integer of Argument Passed

       Degrees = VBA.Int(Decimal_Deg)

       'Set minutes to 60 times the number to the right

       'of the decimal for the variable Decimal_Deg

       Minutes = (Decimal_Deg - Degrees) * 60

       'Set seconds to 60 times the number to the right of the

       'decimal for the variable Minute

       Seconds = VBA.Format(((Minutes - VBA.Int(Minutes)) * 60), "0")

       'Returns the Result of degree conversion

       '(for example, 10.46 = 10~ 27  ' 36")

       CONVERT_DEGREES = " " & Degrees & "° " & VBA.Int(Minutes) & "' " & Seconds & VBA.Chr(34)

    End Function

    '---

    Excel programs (now free) at MediaFire...

    (the 'custom_functions' add-in provides 20 new excel functions)

    http://www.mediafire.com/folder/lto3hbhyq0hcf/Documents

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2019-11-06T10:21:02+00:00

    Hi pasted the VB code into the Module as instructed but did not solve the issue.

    We have migrated to Windows 10 and office365 and the workbook it was written on does not work. (#NAME?)

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2019-11-05T20:09:19+00:00

    It sounds like the UDF (user defined function) has gone missing.

    Here is a link that will guide you through restoring it..

    https://docs.microsoft.com/en-us/office/troubleshoot/excel/convert-degrees-minutes-seconds-angles

    Was this answer helpful?

    0 comments No comments