+ Reply to Thread
Results 1 to 14 of 14

Help converting Coordinates

  1. #1
    Registered User
    Join Date
    01-19-2012
    Location
    bc, canada
    MS-Off Ver
    Excel 2003
    Posts
    15

    Help converting Coordinates

    Hello,
    I have a spreadsheet that has a column filled with both the latitude and longitude in one cell. The Lat and long is separated by a "/" (eg. 55 32.4800 / -113 33.0480). The coordinates are currently in DD MM.mmm format and I would like them in DD.dddddd format and have would like to have Lat and Long in separate columns. Can anyone help me with this? Thanks in advance. I have attached the spreadsheet.
    Attached Files Attached Files

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Help converting Coordinates

    Can you include the desired result, which you can enter manually, for a few rows in your sample?

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,794

    Re: Help converting Coordinates

    This will get you the latitude:

    =LEFT(C2,FIND(" ",C2)-1)+SUBSTITUTE(LEFT(C2,FIND("/",C2)-2),LEFT(C2,FIND(" ",C2)),"")/60

    Hope this helps (just signing off now).

    Pete

  4. #4
    Registered User
    Join Date
    01-19-2012
    Location
    bc, canada
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Help converting Coordinates

    I attached tthe spreadsheet with a couple coordinates manually entered showing my desired result. Thanks
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-19-2012
    Location
    bc, canada
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Help converting Coordinates

    I got the Lat now thanks to Pete_UK, anyone else able to help with the long?

  6. #6
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Help converting Coordinates

    I have never converted coordinates before. Assuming that longitude is calculated the same way as latitude, try this (looking at the workbook from post #4):

    =LEFT(MID(B2,FIND("/",B2)+2,100),FIND(" ",MID(B2,FIND("/",B2)+2,100))-1)-MID(MID(B2,FIND("/",B2)+2,100),FIND(" ",MID(B2,FIND("/",B2)+2,100))+1,100)/60

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Help converting Coordinates

    If split the slt_loc column using Data>Text to columns... with / as the delimiter you can then use the same formula for lat/long.
    If posting code please use code tags, see here.

  8. #8
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Help converting Coordinates

    Alternatively, if the slt_loc will always be in the same format (i.e. ## ##.#### / -### ##.####), you can shorten the longitude formula from post #6 to this:

    =MID(B2,14,4)-RIGHT(B2,7)/60

    and the latitude formula to this:

    =LEFT(B2,2)+MID(B2,4,7)/60

  9. #9
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,849

    Re: Help converting Coordinates

    I like Norie's idea of using text to columns. I would probably expand the idea and split the text on both "/" and " " (space). Then you would get four columns where each coordinate is split into separate degree and decimal minutes columns. The conversion to decimal degrees is then a simple addition =degrees + decimal minutes/60.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,305

    Re: Help converting Coordinates

    Try

    Long

    =(MID($C2,FIND(" /",$C2)+4,3)+(RIGHT(C2,7)/60))*-1

    Lat

    =LEFT(C2,FIND(" ",C2)-1)+MID(C2,FIND(" ",C2)+1,7)/60

  11. #11
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Help converting Coordinates

    Quote Originally Posted by 63falcondude View Post
    Alternatively, if the slt_loc will always be in the same format (i.e. ## ##.#### / -### ##.####), you can shorten the longitude formula from post #6 to this:

    =MID(B2,14,4)-RIGHT(B2,7)/60

    and the latitude formula to this:

    =LEFT(B2,2)+MID(B2,4,7)/60
    I like this approach.
    BTY,it is easy to make a one formula with CHOOSE
    Enter in D2 and copy across to C2 an down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  12. #12
    Registered User
    Join Date
    01-19-2012
    Location
    bc, canada
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Help converting Coordinates

    thanks guys!

  13. #13
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: Help converting Coordinates

    Late comer.

    I like the Norie's idea of Text to columns.

    If formula is preferred you can build helper columns with this in D2 filled down and across column E.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Then in F2 filled down and across column G
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Dave

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,388

    Re: Help converting Coordinates

    This very recent thread may be of interest: https://www.excelforum.com/excel-for...-lat-long.html
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. Converting Lat/Long Coordinates from DMS to DD
    By SebastianJ in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-04-2017, 02:37 PM
  2. Replies: 1
    Last Post: 08-29-2014, 06:40 AM
  3. Converting multiple columns to rows / Converting to Panel Data
    By Stuart11 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-14-2013, 05:50 AM
  4. [SOLVED] Need help converting Coordinates
    By stewman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-11-2013, 08:32 PM
  5. [SOLVED] converting X,Y chart points into actual coordinates
    By Alexander_Golinsky in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-21-2012, 04:34 AM
  6. Converting Geo-Coordinates in Excel?
    By andvin in forum Excel General
    Replies: 0
    Last Post: 03-08-2012, 02:28 PM
  7. [SOLVED] Convert point coordinates -> pixel coordinates
    By Zorro in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-31-2006, 10:30 PM

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