Sorry to impose - I may need some further advice.
The purpose of the sort was to find the closest point, but maintain its index in the original list. A list sort of the distance values can't mantian the original index.
The reason i need this, as the distance value from
distarray(k) = Sqrt(Power((MyArray(k, 1) - Latitude),2) + Power((MyArray(k, 2) - Longitude),2) ) * 111120)
maintained the index of the location/site names.
I have used a list to sort the top ten, but at this point I have to take the top ten values and find them individually to re-establish the original list index - in order to grab the site name.
having said that the list sort was very fast & the code is much better now - despite the slightly clunky way of reestablishing the index.
Is there an alternative sort function that can be used to preserve the original index?
Thanks,
refsmmat