
Specify the origin, the destination, the travel mode (walking or driving) and the function will return the distance between the two points in miles.
#DRIVE MAPPING CODE#
#DRIVE MAPPING WINDOWS#
Calculate the travel time (walking, driving or biking) between two points. Navigate to User Configuration -> Preferences -> Windows Settings -> Drive Mappings 3.Calculate distances between two cities or any addresses.This tutorial explains how you can easily write custom Google Maps functions inside Google Sheets that will help you: If you would like to try the Google Maps formulas without getting into the technical details, just make a copy of this Google Sheet and you are all set.


Or modify the formula slightly =GOOGLEMAPS_TIME(A1, B1, "walking") to know how long it will take for a person to walk from one point to another. To give you a quick example, if you have the starting address in column A and the destination address in column B, a formula like =GOOGLEMAPS_DISTANCE(A1, B1, "driving") will quickly calculate the distance between the two points.

You don’t need to sign-up for the Google Maps API and all results from Google Maps are cached in the sheet so you are unlikely to hit any quota limits. You can bring the power of Google Maps to your Google Sheets using simple formulas with no coding. Use Google Maps formulas inside Google Sheets to calculate distances, travel time, get driving directions, look up postal codes with reverse geocoding and more!
