Sydney
Sydney

Reputation: 1

Finding nearest coordinates on excel

I have Latitude and longitudes for UPS stores. Column a has UPS store code, Column b is the latitudes, Column c is the longitude. I also have another list of latitude (column e) and longitudes (column f) for random Walmart locations. I need to find the nearest set of coordinates of the Walmart and ups stores for shortest driving distance

=INDEX($A$3:$A$434, MATCH(MIN(SQRT((E11-B$3:B$434)^2+(F11-C$3:C$434)^2)), SQRT((E11-B$3:B$434)^2+(F11-C$3:C$434)^2), 0))

I tried this formula (very popular when I search for the solution-however, it works on my small sample data (rows of 10)- However when I try it on the data I need (400+ rows), every single cell returns #VALUE!

Attached is example of my sample data its working on

Upvotes: 0

Views: 141

Answers (0)

Related Questions