Hi guys,
I have a board with a list of cities and I need to create a distance function on VBA that would calculate the distance between these two cities.
I am having a hard time finding where to start, any help would be welcomed
Here is the board:
I have a board with a list of cities and I need to create a distance function on VBA that would calculate the distance between these two cities.
I am having a hard time finding where to start, any help would be welcomed
Here is the board:
Angers | Bordeaux | Caen | Calais | Lille | Lyon | Marseille | Nantes | Nice | Paris | Rennes | Strasbourg | Toulouse | ||
Villes1 | Angers | 0 | 398 | 255 | 512 | 521 | 597 | 905 | 91 | 1062 | 297 | 127 | 777 | 637 |
Bordeaux | 398 | 0 | 617 | 874 | 806 | 556 | 645 | 353 | 802 | 590 | 472 | 945 | 246 | |
Caen | 255 | 617 | 0 | 347 | 388 | 693 | 1002 | 290 | 1159 | 234 | 183 | 739 | 845 | |
Calais | 512 | 874 | 347 | 0 | 110 | 759 | 1069 | 598 | 1226 | 293 | 526 | 621 | 963 | |
Lille | 521 | 806 | 388 | 110 | 0 | 691 | 1001 | 600 | 1158 | 225 | 569 | 554 | 895 | |
Lyon | 597 | 556 | 693 | 759 | 691 | 0 | 314 | 684 | 471 | 466 | 740 | 487 | 537 | |
Marseille | 905 | 645 | 1002 | 1069 | 1001 | 314 | 0 | 985 | 199 | 775 | 1050 | 798 | 403 | |
Nantes | 91 | 353 | 290 | 598 | 600 | 684 | 985 | 0 | 1143 | 385 | 113 | 865 | 586 | |
Nice | 1062 | 802 | 1159 | 1226 | 1158 | 471 | 199 | 1143 | 0 | 932 | 1207 | 785 | 560 | |
Paris | 297 | 590 | 234 | 293 | 225 | 466 | 775 | 385 | 932 | 0 | 353 | 491 | 679 | |
Rennes | 127 | 472 | 183 | 526 | 569 | 740 | 1050 | 113 | 1207 | 353 | 0 | 830 | 700 | |
Strasbourg | 777 | 945 | 739 | 621 | 554 | 487 | 798 | 865 | 785 | 491 | 830 | 0 | 971 | |
Toulouse | 637 | 246 | 845 | 963 | 895 | 537 | 403 | 586 | 560 | 679 | 700 | 971 | 0 |