nigelbradley
New Member
- Joined
- Sep 13, 2017
- Messages
- 4
Hi all,
I'm trying to work out the distance between two sets of lat/long coords.
After much searching I found the formula at the bottom
When I use it with either numbers instead of lat/longs or the cell reference my PC does absolutely nothing. It doesn't post anything in the cell at all, not even an error.
I've tried breaking it down into the 5 different component calculations and they work individually.
<tbody>
[TD="class: xl63"]lat1[/TD]
[TD="class: xl63, width: 64"]long1[/TD]
[TD="class: xl63, width: 64"]lat2[/TD]
[TD="class: xl63, width: 64"]long2[/TD]
[TD="class: xl64"]54.99894[/TD]
[TD="class: xl64"]-1.49062[/TD]
[TD="class: xl64"]55.00885[/TD]
[TD="class: xl64"]-1.5185
[/TD]
</tbody>
=ACOS(COS(RADIANS(90-A2)) *COS(RADIANS(90-C2)) +SIN(RADIANS(90-A2)) *SIN(RADIANS(90-C2)) *COS(RADIANS(B2-D2)))
=ACOS(COS(RADIANS(90-Lat1)) *COS(RADIANS(90-Lat2)) +SIN(RADIANS(90-Lat1)) *SIN(RADIANS(90-Lat2)) *COS(RADIANS(Long1-Long2))) *6371
I'm trying to work out the distance between two sets of lat/long coords.
After much searching I found the formula at the bottom
When I use it with either numbers instead of lat/longs or the cell reference my PC does absolutely nothing. It doesn't post anything in the cell at all, not even an error.
I've tried breaking it down into the 5 different component calculations and they work individually.
<tbody>
[TD="class: xl63"]lat1[/TD]
[TD="class: xl63, width: 64"]long1[/TD]
[TD="class: xl63, width: 64"]lat2[/TD]
[TD="class: xl63, width: 64"]long2[/TD]
[TD="class: xl64"]54.99894[/TD]
[TD="class: xl64"]-1.49062[/TD]
[TD="class: xl64"]55.00885[/TD]
[TD="class: xl64"]-1.5185
[/TD]
</tbody>
=ACOS(COS(RADIANS(90-A2)) *COS(RADIANS(90-C2)) +SIN(RADIANS(90-A2)) *SIN(RADIANS(90-C2)) *COS(RADIANS(B2-D2)))
=ACOS(COS(RADIANS(90-Lat1)) *COS(RADIANS(90-Lat2)) +SIN(RADIANS(90-Lat1)) *SIN(RADIANS(90-Lat2)) *COS(RADIANS(Long1-Long2))) *6371