Calculating Distance between two locations in Google Spreadsheet
Google Spreadsheets provide a lot of useful functions, but unfortunately nothing that calculates the distance between two locations. However, this is easy to add as a custom function using the Maps service available in Google Apps Script. Most of the other approaches I found online seemed to involve using the external APIs provided by Google Maps or MapQuest. But both these approaches required registering for a Developer API Key. The approach I describe here seems a lot simpler. I'll show how to create the following functions and how they can be used in Google Spreadsheets DrivingMeters(origin, destination) - Driving Distance in Meters DrivingMiles(origin, destination) - as above but in Miles DrivingSeconds(origin, destination) - Driving Time in Seconds DrivingHours(origin, destination) - as above but in Seconds