+ Reply to Thread
Results 1 to 3 of 3

Converting from DMS to Decimal Degrees

  1. #1
    Registered User
    Join Date
    06-23-2014
    Location
    Arizona, USA
    MS-Off Ver
    2007
    Posts
    1

    Converting from DMS to Decimal Degrees

    I have a list in the format 69°24'58.48"W, and I need a formula that not only converts, but also gives me a negative value when I have a W for long and S for lat. I'm having difficulties combining an If statement for this with MID and LEFT functions. Any help would be great, thank you.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Converting from DMS to Decimal Degrees

    Hi and welcome to the forum.

    You haven't shown us the full reference including latitude so it's not clear as to the exact text string. In addition we don't know whether if the degrees/minutes/seconds are less than 10 whether there is a preceding zero to fill out to 2 characters. I have assumed there might not be a leading zero hence the following is slightly more complicated than it needs to be if the string is always 13 characters long.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Converting from DMS to Decimal Degrees

    Agreed with Richard that we need to know if the format is consistent.

    I get a slightly different result, and to abbreviate the formula work I have made the assumption that the string will always be of the precise format:

    xx°yy'yy.zz"A

    (i.e. zeroes will be included where necessary, so that e.g. 9°4'58"W will actually be present as 09°04'58.00"W)

    =SUMPRODUCT(0+MID(A1,FIND({"°","'",""""},A1)-{2,2,5},{2,2,5}),1/{1,60,3600})

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] convert decimal degrees to degrees minutes seconds
    By Chris r in forum Excel General
    Replies: 6
    Last Post: 12-06-2013, 06:24 AM
  2. Converting latitude longitude to decimal degrees
    By wardw in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-29-2012, 06:37 PM
  3. Replies: 4
    Last Post: 09-13-2012, 11:21 AM
  4. Converting Lat/Long (Degrees Minutes Seconds) to Decimal Degrees
    By Jeremy Rayne in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2008, 06:02 PM
  5. Replies: 2
    Last Post: 04-28-2006, 07:20 AM

Tags for this Thread

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