whiteghost
Well-known Member
- Joined
- Nov 22, 2002
- Messages
- 500
google earth? er no....sorry routemaster... UK only best solution buy a map
=ACOS(COS(RADIANS(90-Lat1)) *COS(RADIANS(90-Lat2)) +SIN(RADIANS(90-Lat1)) *SIN(RADIANS(90-Lat2)) *COS(RADIANS(Long1-Long2)))*3958.756
Possibly the most useful function ever suggested. Although urinals fail me due to anatomical differences.What I would really like to see is the ability to enter the two zip codes, plus a third cell with a brief description of my urologists diagnosis of my kidney-bladder functions, and have Excel calculate how many pit stops will be needed on the journey. Then, upload it to Mapquest and have it show little urinal icons at all the available Dunkin' Donuts along the route.
Possibly the most useful function ever suggested. Although urinals fail me due to anatomical differences.
=G_Distance(A1,B1)
Function G_DISTANCE(Origin As String, Destination As String) As DoubleDim myRequest As XMLHTTP60
Dim myDomDoc As DOMDocument60
Dim distanceNode As IXMLDOMNode
G_DISTANCE = 0
On Error GoTo exitRoute
Origin = Replace(Origin, " ", "%20")
Destination = Replace(Destination, " ", "%20")
Set myRequest = New XMLHTTP60
myRequest.Open "GET", "http://maps.googleapis.com/maps/api/directions/xml?origin=" _
& Origin & "&destination=" & Destination & "&sensor=false", False
myRequest.send
Set myDomDoc = New DOMDocument60
myDomDoc.LoadXML myRequest.responseText
Set distanceNode = myDomDoc.SelectSingleNode("//leg/distance/value")
If Not distanceNode Is Nothing Then G_DISTANCE = distanceNode.Text / 1000
exitRoute:
Set distanceNode = Nothing
Set myDomDoc = Nothing
Set myRequest = Nothing
End Function