The Scenario
A real estate analyst has a Google Sheet with 200 property listings. Each one needs a driving distance to the nearest metro station so buyers can sort by commute proximity. The metro station coordinates are fixed. The analyst has been asked to have the enriched sheet ready for a client presentation on Friday.
The bad version:
- Write a Google Apps Script to loop over 200 rows, call a distance API for each, and write results back. Spend two hours debugging authentication because the API key format changed.
- Give up on the script and try a third-party add-on. The add-on limits free geocoding calls to 100 per day, so it's a two-day job anyway.
- Do the first 40 rows manually to show progress. Realize on row 17 that you've been entering the metro coordinates in the wrong field order (lng, lat instead of lat, lng) and the distances are nonsense.
The presentation is Friday. It is Wednesday.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent inside your Google Sheet. It reads the property coordinates, calls Radar's routing API for each row against your fixed destination, and writes the distance and duration columns — no scripting, no add-on limits.
For each row in this sheet, calculate the driving distance and travel time from the origin coordinates in columns A and B to the fixed destination (latitude 40.7128, longitude -74.0060) using Radar and write distance (km) and time (min) to columns C and D
What You Get
- Column C: driving distance in kilometers from each property to the metro station
- Column D: estimated driving time in minutes
- All 200 rows processed in one pass, ready to sort or filter by distance for the client presentation
What If the Data Is Not Quite Ready
Some rows have missing coordinates
For each row in this sheet where both column A (lat) and column B (lng) are non-empty, calculate driving distance and time to the fixed metro station (40.7128, -74.0060) via Radar and write results to columns C and D — mark rows with missing coordinates as No Coordinates in column C
Different listings have different destination metro stations based on the neighborhood column
For each row in this sheet, look up the metro station coordinates from Sheet2 using the neighborhood name in column C, then calculate driving distance and time from origin (lat A, lng B) to that station via Radar and write results to columns D and E
You need distances in miles rather than kilometers
Calculate driving distance and time from each property (lat A, lng B) to the fixed metro (40.7128, -74.0060) via Radar for all 200 rows — write distance in miles (convert from km) to column C and driving time in minutes to column D
Clean coordinates, calculate distances, and add a commute tier label in one pass
For each of the 200 rows (lat in A, lng in B): validate that the coordinates are in valid range, calculate driving time to the metro (40.7128, -74.0060) via Radar, write distance (km) to column C and time (min) to column D, then add a label in column E: "Under 10 min", "10-20 min", or "Over 20 min"
That label column saves a separate analysis step before the presentation.
Try It
Get the 7-day free trial of SheetXAI and open any Google Sheet with origin coordinates — ask it to calculate Radar driving distances to a fixed or per-row destination and write the results into the sheet. For routing across multiple stops, see fetching turn-by-turn directions, or return to the Radar integration overview.
