Back to HERE in Google Sheets
SheetXAI logo
HERE logo
HERE · Google Sheets Guide

Optimize a Multi-Stop Delivery Route in Google Sheets Using HERE

2026-05-13
4 min read
See the Excel version →

The Scenario

You are a last-mile delivery coordinator. It is 7:30 AM and the driver leaves at 8:15 AM. Tomorrow's route has 15 stops, all loaded into a Google Sheet, addresses in column B. Columns C and D are blank.

Your current process is handing the driver a printed list and letting him sequence it in his head. Last week that cost 40 minutes of extra driving when he went north first and had to come all the way back south.

The bad version of this morning:

  • You open a mapping app and manually drag stops into order
  • The app does not save the sequence back to the sheet
  • You write the order down by hand and type it into column C
  • You estimate arrival times by feel
  • The driver leaves with a sequence that is still not optimal and arrival times you made up.

The fast version is one prompt.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent inside your spreadsheet that reads your stop list, geocodes it, calls HERE Waypoint Sequence to find the optimal route, and writes the results back.

Open the SheetXAI sidebar and type:

Geocode all addresses in column B, then use HERE Waypoint Sequence to find the optimal visit order starting from the depot address in cell A1. Write the optimized sequence number (1–15) to column C and the estimated arrival time for each stop to column D.

SheetXAI geocodes each stop, sends the full set to HERE for sequence optimization, and writes both the visit order and arrival times back. The driver gets a numbered list in the sheet with real arrival estimates.

What You Get

An optimized route, in the sheet, before the driver walks in:

  • Column C — optimal visit sequence number for each stop (1 through 15)
  • Column D — estimated arrival time at each stop
  • Stops in the original order — the driver can sort by column C to get the route, or you can sort it for them

Sorting column C ascending gives the driver a sequenced itinerary. The order minimizes total drive time, not just total distance, so the route accounts for road geometry.

Want to re-run with a different depot or a different departure time? One more prompt. SheetXAI does not require re-configuring anything.

What If the Data Is Not Quite Ready

Real stop lists have address quality issues and operational constraints. SheetXAI handles them in the route optimization prompt.

When some stops have priority delivery windows

Certain stops must be visited before 10 AM. Column E has "Priority" for those rows.

Geocode all addresses in column B. Use HERE Waypoint Sequence to find the optimal route from the depot in cell A1, treating all rows where column E equals "Priority" as must-visit-first stops. Write the sequence number to column C and estimated arrival to column D.

When two stops share the same building

You have multiple deliveries to the same address. You only need to visit the building once.

Identify duplicate addresses in column B and merge them into a single stop for the routing call. Run HERE Waypoint Sequence from the depot in cell A1, write the optimized sequence to column C, and for any merged stops write the same sequence number to all matching rows in column C.

When you want the route sorted and written back automatically

You do not want to hand the driver a sheet where he has to sort. You want the rows reordered by visit sequence.

Geocode addresses in column B, run HERE Waypoint Sequence from the depot in cell A1, then sort all rows by the optimized sequence and write the resulting sorted sheet with sequence numbers in column C and arrival times in column D.

When you need geocoding, optimization, and distance totals in one pass

You want the optimal route, you want each stop's arrival time, and you want a summary row at the bottom with total route distance and total estimated time.

Geocode all 15 addresses in column B using HERE. Run HERE Waypoint Sequence from the depot in cell A1 to find the optimal visit order. Write sequence numbers to column C and estimated arrival times to column D. Then add a summary row at the bottom of the list showing total route distance in kilometers and total estimated drive time in minutes.

The pattern: geocoding, sequencing, and summary in one prompt, so the driver's sheet is complete and annotated before they arrive.

Try It

Get the 7-day free trial of SheetXAI and open any sheet with delivery stop addresses, then ask it to optimize the route using HERE. The HERE integration is included in every SheetXAI plan. See also how to calculate drive times from a fixed origin or the HERE in Google Sheets overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more