please help with vba to make Repetition to measure distance decimal value coordinate

deeproject

New Member
Joined
Oct 26, 2016
Messages
10
dearmr excel

i have problem for sorting data with decimal coordinate.
well i get bunch of data from other division , the give me location code with decimal coordinates, some of data actually related for instance data GKS08.12 related to GKS08.01.01.06&07 since this data should be same coordinate or in range 0-3m distance.

so i need help with vba to make repition to measure distance one cordinates with other coordinate and sort it which result 0-3m distance range and assume that data related so i cant put in database.

i use this formula to measure distance in meter
=ACOS(COS(RADIANS(90-lat1))*COS(RADIANS(90-lat2))+SIN(RADIANS(90-lat1))*SIN(RADIANS(90-lat2))*COS(RADIANS(long1-long2)))*6371000


thank you in advance

best regards

here examples of data in 1 area.

GKS08.01 -6.959622023 110.4694704
GKS08.02 -6.960006392 110.4694811
GKS08.03 -6.960313518 110.4694959
GKS08.04 -6.960783697 110.4695013
GKS08.05 -6.961229308 110.4695089
GKS08.06 -6.961323235 110.4696979
GKS08.07 -6.961393764 110.469959
GKS08.08 -6.961476613 110.4702424
GKS08.09 -6.96158093 110.4705666
GKS08.10 -6.961674373 110.4708889
GKS08.11 -6.961766762 110.4710751
GKS08.12 -6.961920607 110.4712085
GKS08.13 -6.962054821 110.4713802
GKS08.14 -6.962136621 110.4717205
GKS08.15 -6.96220547 110.4720446
GKS08.16 -6.961868779 110.471497
GKS08.17 -6.96157129 110.471585
GKS08.18 -6.961227473 110.4716733
GKS08.19 -6.960097716 110.4698066
GKS08.20 -6.960189607 110.4701431
GKS08.21 -6.960227366 110.4704003
GKS08.22 -6.960158857 110.470636
GKS08.23 -6.960480147 110.4707939
GKS08.24 -6.960874526 110.4709035
GKS08.25 -6.959827281 110.4704946
GKS08.26 -6.95959777 110.4703373
GKS08.27 -6.959341684 110.4702056
GKS08.28 -6.95922421 110.4702259
GKS08.29 -6.959196691 110.4705888
GKSS08.30 -6.959189572 110.4708289
GKS08.31 -6.958883317 110.4708594
GKS08.32 -6.959188394 110.4711058
GKS08.33 -6.959468695 110.4711176
GKS08.34 -6.958908829 110.4711097
GKS08.35 -6.959279542 110.4693835
GKS08.36 -6.959275526 110.469827
GKS08.37 -6.958894137 110.4703218
GKS08.38 -6.958637235 110.4703762
GKS08.39 -6.958674927 110.4705981
GKS08.40 -6.958573453 110.4701613
GKS08.41 -6.958512175 110.4699536
GKS08.42 -6.958277204 110.4702313
GKS08.43 -6.957984521 110.4702546
GKS08.44 -6.957630714 110.4702051
GKS08.45 -6.957565551 110.4699593
GKS08.46 -6.957501236 110.4697089
GKS08.47 -6.957156531 110.469735
GKS08.48 -6.956794697 110.4697923
GKS08.49 -6.956558105 110.4698894
GKS08.50 -6.9562839 110.469892
GKS08.51 -6.956018961 110.4699149
GKS08.52 -6.955996716 110.4696164
GKS08.53 -6.958895822 110.4692941
GKS08.54 -6.95839392 110.4691456
GKS08.55 -6.95846516 110.4695256
GKS08.56 -6.957946522 110.4690334
GKS08.57 -6.957645375 110.468965
GKS08.58 -6.957331795 110.4688959
GKS08.59 -6.956983883 110.4688
GKS08.60 -6.956634811 110.4687063
GKS08.61 -6.956348406 110.4686237
GKS08.62 -6.956024161 110.4685406
GKS08.01.01.01 -6.961330222 110.4697121
GKS08.01.01.02&03 -6.961480447 110.4702547
GKS08.01.01.04&05 -6.961762777 110.4710754
GKS08.01.01.06&07 -6.961926086 110.4712243
GKS08.01.01.08&02.01 -6.96220282 110.4720562
GKS08.01.02.02&03 -6.961229091 110.4716963
GKS08.01.02.04&05 -6.960137001 110.4706761
GKS08.01.02.06 -6.960884666 110.4709301
GKS08.01.02.07&08 -6.959599689 110.4703523
GKS08.01.03.01 -6.959205727 110.470585
GKS08.01.03.02&03 -6.958836723 110.4708744
GKS08.01.03.04 -6.959438409 110.4711452
GKS08.01.03.05&06 -6.958903679 110.4711151
GKS08.01.03.07&08 -6.959289686 110.4698412
GKS08.01.04.01&02 -6.958563168 110.4703969
GKS08.01.04.03&04 -6.958519298 110.4699543
GKS08.01.04.05&06 -6.957633515 110.4702329
GKS08.01.04.07&08 -6.956802165 110.4698152
GKS08.01.05.01&02 -6.956003547 110.4696267
GKS08.01.05.03&04 -6.95846571 110.469552
GKS08.01.05.05 -6.957317002 110.4689332
GKS08.01.05.06 -6.956031764 110.4685636
ODC48.GKS08.01 -6.959610499 110.4695089

Excel Help Forum
 
Last edited by a moderator:

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Can you please supply a working link to your other thread, many thanks.
 
Upvote 0

Forum statistics

Threads
1,215,030
Messages
6,122,762
Members
449,095
Latest member
m_smith_solihull

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top