The Scenario
You manage field service scheduling. Your operations workbook in Excel has technician home addresses in column A and job site addresses in column B — fifty rows. Every morning you need driving duration, distance, and a turn-by-turn summary for each assignment in columns C, D, and E before dispatch at 7 AM. The ops coordinator who handled this left three weeks ago.
The bad version:
- Open Google Maps fifty times, type each pair, note the time and distance, paste them back row by row.
- Make a copy-paste error around row twenty, putting a job site address in the wrong row.
- Realize you also need the first three turn instructions and Google Maps does not let you extract those programmatically.
Fifty rows. Forty-five minutes. Every morning.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent that lives inside your Excel workbook. It reads the origin and destination columns, calls Mapbox Directions for each pair, and writes duration, distance, and turn steps back into the workbook — fifty rows at once.
For each row with an origin address in column A and destination address in column B, use Mapbox directions to get the driving route and write duration in minutes into column C, distance in km into column D, and the first 3 turn instructions into column E.
What You Get
- Column C with driving duration in minutes for each row.
- Column D with total distance in kilometers.
- Column E with the first three turn instructions concatenated.
- Any row where either address fails to geocode gets ROUTE FAILED in column C.
What If the Data Is Not Quite Ready
Several technician home addresses may be outdated
Before getting directions, geocode all addresses in column A using Mapbox and flag any that return a confidence score below 0.7 in column F as VERIFY ADDRESS. Then get driving directions for all unflagged rows and fill duration, distance, and turn instructions into columns C, D, and E.
Flag assignments over 45 minutes as a dispatch concern
Get Mapbox driving directions for all 50 pairs. Write duration into column C, distance into column D, and the first 3 turns into column E. Add a column F flag that says LONG DRIVE for any row where column C is greater than 45.
You want drive times grouped by district with subtotals
Get Mapbox driving directions for all rows. Write duration into column D and distance into column E. Group rows by district code in column C and add a subtotal row after each group showing the average drive time for that district.
Full pipeline: validate addresses, get directions, flag long drives, and produce a dispatch summary worksheet
Check all addresses in columns A and B for obvious formatting errors and flag those in column F as NEEDS FIX. For all other rows, get Mapbox driving directions and write duration into column C, distance into column D, and the first 3 turns into column E. Flag any row over 45 minutes in column G as LONG DRIVE. Create a new worksheet called Dispatch Summary with columns: Technician Address, Job Site, Duration, Distance, Flag — sorted by Flag first, then Duration descending.
One prompt handles validation, directions, flagging, and summary worksheet creation.
Try It
Get the 7-day free trial of SheetXAI and open your dispatch workbook tomorrow morning — paste in the origin and destination columns and ask SheetXAI to pull Mapbox driving directions for every row before your team clocks in. The route optimization article covers multi-stop sequencing. The Mapbox hub has the complete workflow list.
