+ Reply to Thread
Results 1 to 7 of 7

convert decimal degrees to degrees minutes seconds

  1. #1
    Chris r
    Guest

    convert decimal degrees to degrees minutes seconds

    im tryin to make a function in a cell and i want to know do i convert decimal
    degrees to degrees minutes seconds

    thanks


  2. #2
    jlucy
    Guest

    RE: convert decimal degrees to degrees minutes seconds

    I've used this:
    A B FORMULA IN
    COLUMN B
    1 Latitude in DD 39.89458898
    2 minutes 53.67533862 =(B1-INT(B1))*60
    3 seconds 40.5203172 =(B2-INT(B2))*60
    4 converted to DMS 39d 53m 40.52032s =CONCATENATE(INT(B1),"d ",INT(B2),"m
    ",ROUND(B3,5),"s")

    you wouldn't need the "d " or "m " or "s" in the concatenate formula if you
    don't want or need them, and I wanted the seconds rounded to 5 decimal places
    so that is why the ROUND function.

    "Chris r" wrote:

    > im tryin to make a function in a cell and i want to know do i convert decimal
    > degrees to degrees minutes seconds
    >
    > thanks
    >


  3. #3
    Sandy Mann
    Guest

    Re: convert decimal degrees to degrees minutes seconds

    AS there are sixty seconds in minutes and seconds in both angles and time
    you can use Excels time format:

    Divide your decimal angle by 24 and format as [H]:mm-ss

    --
    HTH

    Sandy
    sandymann@mailinator.com
    Replace@mailinator with @tiscali.co.uk


    "Chris r" <Chris r@discussions.microsoft.com> wrote in message
    news:DEEA8AA3-8D76-4241-B060-CC18BB07CB24@microsoft.com...
    > im tryin to make a function in a cell and i want to know do i convert
    > decimal
    > degrees to degrees minutes seconds
    >
    > thanks
    >




  4. #4
    Registered User
    Join Date
    12-05-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: convert decimal degrees to degrees minutes seconds

    You can use this to convert DD.DD to DD MM SS

    change the format as you want it

    Function DD2DMS(Degrees)
    DD2DMS = Format(Int(Abs(Degrees)) * Sgn(Degrees), "00") & " " & Format(60 * (Abs(Degrees) - Abs(Int(Abs(Degrees)) * Sgn(Degrees))), "00") & "' " & Format(60 * (60 * (Abs(Degrees) - Abs(Int(Abs(Degrees)) * Sgn(Degrees))) - Int(60 * (Abs(Degrees) - Abs(Int(Abs(Degrees)) * Sgn(Degrees))))), "00.00") & "''"
    End Function

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    51,366

    Re: convert decimal degrees to degrees minutes seconds

    srm057, thats a pretty complex looking UDF, but this thread is 8 years old, I doubt they are still monitoring it now
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Registered User
    Join Date
    12-05-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: convert decimal degrees to degrees minutes seconds

    I was looking for the same thing in the morning. I ended up doing myself so i thought I should share it.

    this is the easy version of the same function.

    Please Login or Register  to view this content.
    Last edited by arlu1201; 12-06-2013 at 06:24 AM.

  7. #7
    Registered User
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,162

    Re: convert decimal degrees to degrees minutes seconds

    srm057,

    Welcome to the forum.

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. In order to put code tags, either type [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] at the end of it, OR you can highlight your code and click the # icon at the top of your post window.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1