I have 10 pushpins. Is there a way to calculate the distance from each push pin to the other nine and then export that information to an excel spread sheet. For example Pushpin 1 is NewYork City

Pushpin 2 is Chicago
Pushpin 3 is LA and So on

For Pushpin 1 (NY)
I would like to see the distance Between NY And Chicago as well as NY to LA and the remaining 7 locations

Then For Push pin 2 (Chicago) I would like to see the distances to the other Locations.

Is this possible through Code?
Any help appreaciated Greatly

Thanks in Advance