Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Mar 2002
    Location
    Austin, TX,USA
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Specifying Angles

    Good Day All,

    I try to work with angles, (trig), quite frequently.
    I would like to find some way to format a number so it
    would be possible to enter degrees, minutes, seconds, decimal seconds, within one cell, (other than converting
    all to decimal degrees first).

    Is this possible?

    Thank You,
    G'day

  2. #2
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Reading/Swindon, Berkshire, United Kingdom
    Posts
    664
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Specifying Angles

    Can you achieve the result you're after by formatting the cell as a time - eg hours:minutes:seconds, which is fairly close to degrees:minutes:seconds?

    Brooke

  3. #3
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Kortrijk, Belgium
    Posts
    571
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Specifying Angles

    *** Geoff W- edited to split long lines ***

    There is no way to enter degrees, minutes, seconds and convert it into radials. There exists an Analysis Toolpak function that converts a number in radials ('RADIALS'). Inversely, if I am not wrong, there is also no way to format the number (radials) in degrees, but there is an Analysis Toolpak function, called 'DEGREES' that converts radials into degrees.
    Another way is to write your own functions and use the format that you wish, something like this (please check the calculations, I am not sure the conversion is correct):

    <pre>Function RadialsToDegrees(dec As Double) As String
    Dim degrees As Long
    Dim minutes As Long
    Dim seconds As Long
    Dim MilleSeconds As Long
    dec = dec * 180
    degrees = Int(dec)
    minutes = Int((dec - degrees) * 60)
    seconds = Int(((dec - degrees) * 60 - minutes) * 60)
    MilleSeconds = Int((((dec - degrees) * 60 - minutes) * 60 - seconds) * 60)
    RadialsToDegrees = Str$(degrees) & "

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •