Spreadsheets on a map · 4 min

Add a distance column to every row

Distance to the coast, a border or your nearest store, as a column you can sort and filter.

1 / 8

Spreadsheets on a map

One number per row

Once every row has coordinates, you can give each one a distance: to the coast, to the nearest border, to the nearest town or to your nearest store.

As a column it becomes useful at once. Sort it to find the closest and farthest, filter it to keep everything within 10 km.

4 min lesson

Lesson notes

Everything from the cards above, on one page to come back to.

One number per row

Once every row has coordinates, you can give each one a distance: to the coast, to the nearest border, to the nearest town or to your nearest store.

As a column it becomes useful at once. Sort it to find the closest and farthest, filter it to keep everything within 10 km.

The decimal comma trap

In much of Europe, Excel writes 53,35 instead of 53.35. In a CSV the comma is also the separator between columns, so 53,35 becomes two columns, 53 and 35.

Before you export, make sure coordinates use a full stop for the decimal point, or check the CSV in a text editor first.

Doing it in MapGO

To the nearest of your own shapes: put both layers on the workspace map and run Join columns by nearest in the Process tools. Each point gets the nearest shape's columns plus distance_km or distance_mi.

To the coast, a border or the nearest town for a whole CSV: upload it on a paid plan and pick the lookup. Every row comes back with its distance.

Open Process tools

Questions

How do I calculate distance for every row in a spreadsheet?

Give each row coordinates, then run a nearest join or a bulk distance lookup. MapGO's Join columns by nearest adds the distance to the nearest of your own shapes; its CSV upload adds distance to the coast, border or nearest town.

Is the distance a driving distance?

No, MapGO measures straight lines on the curved Earth. A road route is the same or longer.