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

Geocode a Column of Addresses Into Lat/Lon Coordinates in a Google Sheet

2026-05-13
5 min read

The Scenario

You're the ops coordinator for a delivery startup, and your Monday morning opens with a Google Sheet someone dropped in your inbox: 200 customer addresses in column A, columns B and C blank, a note saying "need lat/lon before the route optimizer runs at noon."

The bad version:

  • Copy the addresses 25 at a time, paste them into Geokeo's web interface, download the result CSV, realign it to the original sheet, pray the row count matches.
  • Hit the point around row 75 where one address returns zero results, which shifts every subsequent row in the output by one, and spend 40 minutes untangling it.
  • Get to row 200 at 11:55 AM, realize three coordinates are clearly wrong (the geocoder resolved "Main St" to the wrong city), and have no time to fix them before the route optimizer fires.

There are 17 other things on your plate this morning. Geocoding 200 rows by hand is not one of them — and the route optimizer doesn't care about your excuses.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent that lives inside your Google Sheet. It reads the sheet, understands what you're looking at, and through its built-in Geokeo integration it runs the geocoding pass for you — no API calls to structure, no CSV to realign, no row-count reconciliation.

Open the SheetXAI sidebar and paste this prompt:

For each address in column A of the "Deliveries" tab, use Geokeo to look up the latitude and longitude and write the coordinates into columns B and C. If Geokeo returns multiple candidate results, use the top-ranked one. Flag any rows where the confidence score is below 0.8 in column D so I can review them.

What You Get

  • Columns B and C filled with latitude and longitude values for all 200 rows, aligned to the source address in column A.
  • Column D populated with a flag for any row where Geokeo's top result had a confidence score below 0.8 — the addresses worth a second look before they go into the route optimizer.
  • Rows where Geokeo returned zero results left blank in B and C, with a note in D so nothing silently disappears.
  • The original addresses in column A untouched.

What If the Data Is Not Quite Ready

The addresses are split across "Street," "City," and "State" columns instead of one combined field

In the "Deliveries" tab, concatenate the values in columns A (Street), B (City), and C (State) into a full address string. Geocode each combined address using Geokeo and write the latitude into column D and longitude into column E. If a combined address is blank, skip that row.

Some addresses have apartment numbers or suite numbers that Geokeo sometimes struggles with

Geocode the addresses in column A of the "Deliveries" tab using Geokeo. For rows where the address contains "Apt," "Suite," or "#", also attempt the geocode with the unit number stripped and use whichever result has the higher confidence score. Write lat to column B, lon to column C, and the version used to column D.

The sheet has addresses from multiple countries and Geokeo requires the country code for accurate results

In the "Deliveries" tab, column A has addresses and column B has ISO country codes. Geocode each address using Geokeo, passing the country code from column B as the country filter. Write latitude to column C and longitude to column D.

The addresses are messy, some are already geocoded, and the team needs a clean output for the mapping tool by end of day

In the "Deliveries" tab: skip any row where columns B and C already have values. For the remaining rows, clean the address in column A by standardizing abbreviations (St → Street, Ave → Avenue, Blvd → Boulevard). Then geocode each cleaned address using Geokeo, write lat to column B and lon to column C, and flag any row with a confidence score below 0.8 in column D.

One prompt covers the cleanup, the skip logic, and the geocoding — so you're not running three separate passes.

Try It

Get the 7-day free trial of SheetXAI and open the delivery sheet that's been sitting in your inbox, then ask it to geocode column A into lat/lon. For GPS coordinates that need to go the other way, see Reverse Geocode GPS Coordinates Into Street Addresses. For everything Geokeo can do with your sheet, see the Geokeo Google Sheets integration overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

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

Learn more