+ Reply to Thread
Results 1 to 16 of 16

Formula to determine distance between 2 points (lat/long)

  1. #1
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Formula to determine distance between 2 points (lat/long)

    Hi,

    Out of left field, I have location data for a series of points which contains latitudes and longitudes. I would like to know how to calculate if each of these points are within a 50km radius of another given latitude and longitude.

    Is this something possible in Excel or maybe some other process?

    Thanks
    Last edited by kersplash; 04-05-2018 at 02:24 AM. Reason: Edited the title

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Formula to determine distance between 2 points

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Formula to determine distance between 2 points

    Attached is the sample data. Thankyou.

    Just to clarify I want to check which towns in the main table are within 50km of the single location given.
    Attached Files Attached Files

  4. #4
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Formula to determine distance between 2 points

    This link might prove helpful: http://www.movable-type.co.uk/scripts/latlong.html

    The algorithm is quite complex.
    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.

  5. #5
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Formula to determine distance between 2 points

    What is your exacted result for this table ??

  6. #6
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Formula to determine distance between 2 points

    OMG Ali seriously this is quite complex to understand

  7. #7
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Formula to determine distance between 2 points

    Quote Originally Posted by AliGW View Post
    This link might prove helpful: http://www.movable-type.co.uk/scripts/latlong.html

    The algorithm is quite complex.
    Thanks Ali, I thought it might be, I'll have a look at the link.

    @shukla - I just want the table to show "Yes" if it's within 50km of the test location Town21 and "No" if it's not.

  8. #8
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Formula to determine distance between 2 points

    Quote Originally Posted by kersplash View Post
    Thanks Ali, I thought it might be, I'll have a look at the link.
    ...picks jaw up off floor.

  9. #9
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Formula to determine distance between 2 points

    I'm sure it's doable for anyone with the mathematical prowess to replicate the algorithm using Excel functions. However, that ain't me ...

  10. #10
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Formula to determine distance between 2 points

    It came up once before and this link was provided: http://www.contextures.com/excellatitudelongitude.html
    Last edited by AliGW; 04-05-2018 at 02:24 AM. Reason: Corrected link.

  11. #11
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Formula to determine distance between 2 points (lat/long)

    so what will be the distance of the first lat/long, is it 3135.030?
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  12. #12
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Formula to determine distance between 2 points (lat/long)

    May be try

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

  13. #13
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Formula to determine distance between 2 points

    Quote Originally Posted by AliGW View Post
    It came up once before and this link was provided: http://www.contextures.com/excellatitudelongitude.html
    Thanks Ali will check this one and hopefully not pass out.

  14. #14
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Formula to determine distance between 2 points (lat/long)

    Quote Originally Posted by vlady View Post
    so what will be the distance of the first lat/long, is it 3135.030?
    I don't know what the answer is???

  15. #15
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Formula to determine distance between 2 points (lat/long)

    Quote Originally Posted by vlady View Post
    so what will be the distance of the first lat/long, is it 3135.030?
    Yes Vladimir your are correct it is 3135.030

    Here is a blog link which explain the same thing for excel http://bluemm.blogspot.in/2007/01/ex...-distance.html

  16. #16
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Formula to determine distance between 2 points (lat/long)

    Quote Originally Posted by shukla.ankur281190 View Post
    May be try

    B2
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Wow!!!

    Perfect. Thankyou so much for all your help.

+ 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. (x,y) distance between points
    By george1963 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-03-2015, 06:43 PM
  2. Replies: 1
    Last Post: 08-27-2014, 04:30 PM
  3. [SOLVED] Calculating distance between many GPS points and sorting by distance
    By jackalek in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 07-14-2014, 08:27 AM
  4. Formula to determine angle between 3 points
    By stockgoblin42 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-17-2013, 08:23 AM
  5. Distance between two points
    By dinuhere in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-28-2012, 06:42 AM
  6. Distance between 2 geo-points
    By bstubbs in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-19-2009, 07:53 AM
  7. formula to find distance across points on a grid
    By Powrpak in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-24-2008, 04:35 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