The Scenario
You are a field rep manager. It is Thursday at 4 PM and your team's weekly route assignments go out tomorrow morning. You have 60 client sites in a Google Sheet, lat/lng already in columns C and D. Column E and F are blank.
You need driving distance and travel time from the regional office to every site, so the scheduler can group nearby stops and avoid sending reps on four-hour round trips.
The bad version of Thursday afternoon:
- You open Google Maps, type the origin, paste the first destination, read the time, type it into column E
- You do the same for all 60 rows
- After 20 rows you start making copy-paste errors
- You re-check six rows and find two wrong values
- You are still doing this at 6:30 PM and the scheduler is waiting.
The fast version is one prompt.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent inside your spreadsheet that reads your coordinates and calls HERE Routing for every row, writing results back into the sheet.
Open the SheetXAI sidebar and type:
Calculate driving distance and travel time from the fixed origin in cells A1 and B1 to each destination lat/lng in columns C and D. Write distance in kilometers to column E and travel time in minutes to column F. Skip rows where columns C or D are blank.
SheetXAI reads the fixed origin from A1/B1, iterates over every destination row, calls HERE Routing, and writes both values back. The blank-skip logic means you do not get errors in partial rows.
What You Get
A routing-enriched sheet the scheduler can work with directly:
- Column E — driving distance in kilometers to each site
- Column F — estimated travel time in minutes from the regional office
- Blank rows skipped — no error values cluttering the range
Sort column F ascending and the scheduler immediately sees which sites are under 30 minutes, which are between 30 and 60, and which are the outliers. No secondary analysis step needed.
If you want to add a "traffic-adjusted" estimate for rush-hour departure, ask SheetXAI to re-run with a departure time parameter and write those results to column G.
What If the Data Is Not Quite Ready
Real site lists have gaps, inconsistencies, and complications. SheetXAI handles them inline.
When coordinates are in one column as a combined string
Your export put lat and lng together in column C as "40.7128,-74.0060" instead of two separate columns.
Split the coordinate string in column C into lat in column D and lng in column E. Then calculate driving distance and travel time from the origin in cells A1 and B1 to each destination in columns D and E, writing results to columns F and G.
When some sites are flagged inactive
Column G has a status field. You want routing only for active sites.
For rows where column G equals "Active", calculate driving distance and travel time from the depot at 40.7128,-74.0060 to the destination in columns C and D, writing distance to column H and time to column I. Skip all rows where column G is not "Active".
When you want to flag sites over a distance threshold
The scheduler needs to know which sites require overnight stays, anything over 300 km.
Calculate drive distance and time from cells A1/B1 to each row's coordinates in columns C and D, writing to columns E and F. Then add a flag in column G: write "Overnight" if distance exceeds 300 km, otherwise write "Day Trip".
When you need geocoding first, then routing in one pass
Your sheet has addresses in column A, not coordinates, and you need drive times by end of day.
Geocode each address in column A using HERE and write lat/lng to columns C and D. Then compute driving distance and travel time from the depot at 51.5074,-0.1278 to each row's coordinates and write distance in kilometers to column E and time in minutes to column F. Skip rows where column A is blank.
The pattern: one prompt chains the geocoding and routing calls so you do not have to run two separate operations and wait between them.
Try It
Get the 7-day free trial of SheetXAI and open any sheet with client coordinates, then ask it to calculate drive times using HERE. The HERE integration is included in every SheetXAI plan. See also how to bulk-geocode addresses or the HERE in Google Sheets overview.
