[GIS] How to compute the distance between centroids and polygons

distance

Suppose I have an Excel spreadsheet with the latitude and longitude of the centroid of every county in the U.S. I want to know the shortest distance from each county to any part of Oklahoma (presumably, somewhere along the border). I then want this distance in this Excel spreadsheet as a new column.

Is this possible to do and how? I know next to nothing about GIS

Best Answer

If you know the coordinates of the point in OK, the haversine formula should be pretty easy to implement in Excel. This will give you the approximate as-the-crow-flies distance between the points.