I hope the heading is the correct description of my problem
What the worksheet does is find the distances between given locations using latitude and longitude.
(Don't worry, the math is already done)
There is the Departure and Destination data. These, obviously, are needed.
The math calculates the values from the Departure to Destination.
There is the option to include, up to nine, stops in-between the Departure and Destination.
Here the math would calculate the distance from the Departure to the first stop, then the distance from the first stop to the second, etc. until the Destination is reached.
If all the optional stops are included then everything works well.
The problem is if there are fewer than nine stops then errors occur.
I can't figure the logic if there are fewer than the nine stops.
Any help would be greatly appreciated.
George
Bookmarks