Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 02-03-2015, 03:24 AM
macropod's Avatar
macropod macropod is offline trying to find a way to show a closest to using lat and long coordinates Windows 7 64bit trying to find a way to show a closest to using lat and long coordinates Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,514
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

FWIW, the standard formula for calculating the distance between two lat/lon coordinates is:
Code:
=ACOS(SIN(RADIANS(Lat1))*SIN(RADIANS(Lat2))+COS(RADIANS(Lat1))*COS(RADIANS(Lat2))*COS(RADIANS(Long1-Long2)))*RadiusEarth
That's the basic formula my solution uses. It's not especially accurate at very small differences, particularly near the poles, but that's of no consequence for this exercise, and any errors will still scale according to the differences in the true distances. Without the '*RadiusEarth' part (6367.465km/3956.559mi on average), you simply get a value applicable to any size sphere. Indeed, the above formula all there is to the second one in post #8, except that one also uses the MIN function in an array formula to return the minimum distance.

The MATCH function simply uses two of these formulae (without the '*RadiusEarth' part), first with the MIN function to calculate a minimum spherical value, the second without the MIN function to find which row produces that value. The INDEX function merely outputs the corresponding name from the row returned by the MATCH function in column C.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Tags
find the closest, lat and long



Similar Threads
Thread Thread Starter Forum Replies Last Post
Show two alternating slides as long as music plays Magic PowerPoint 2 11-23-2014 09:02 AM
trying to find a way to show a closest to using lat and long coordinates Bad view when using Find and Find & Replace - Word places found string on top line paulkaye Word 4 12-06-2011 11:05 PM
trying to find a way to show a closest to using lat and long coordinates Highlight and put bookmark on the closest field to the cursor b0x4it Word VBA 11 05-19-2011 11:15 PM
Question: Hyperlink to other show, but close the current show habibfikri PowerPoint 0 12-26-2010 02:37 AM
PP 2010 .avi file plays during slide show, but causes the slide show to loop to begin VictorS PowerPoint 0 10-16-2010 10:23 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:18 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft