Back to Mapbox in Excel
SheetXAI logo
Mapbox logo
Mapbox · Excel Guide

Bulk Geocode a Column of Addresses Into Lat/Lon in a Excel workbook

2026-05-14
5 min read

The Scenario

Your field sales team just handed you an Excel workbook with 400 prospect addresses in column A. The territory-mapping tool requires latitude and longitude for each one. The addresses came from three different CRM exports with inconsistent formatting — some have full ZIP codes, some have only city and state, and about thirty are international.

The bad version:

  • Copy batches of addresses into the Mapbox Playground one at a time, note the coordinates, paste them into columns B and C row by row.
  • Hit an ambiguous address and spend time figuring out which match the CRM intended.
  • Finish three hours later to discover the sales team added forty more rows since you started.

The VP of Sales wants the territory map populated before Friday's review. You are not a GIS analyst — your job is territory planning, not geocoding plumbing.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent that lives inside your Excel workbook. It reads the addresses, calls the Mapbox geocoding API for each row, and writes coordinates back into the workbook — no scripting, no tab-switching.

For each address in column A, use Mapbox to geocode it and write the latitude into column B, longitude into column C, and place name into column D — flag any unresolved rows in column E with "LOW CONFIDENCE" so I can review them.

What You Get

  • Column B filled with decimal latitude values.
  • Column C filled with decimal longitude values.
  • Column D filled with the Mapbox-resolved place name so you can spot mismatches visually.
  • Column E blank for clean geocodes; populated with LOW CONFIDENCE for any row where Mapbox returned a city-level centroid instead of a street-level match.

What If the Data Is Not Quite Ready

The addresses have inconsistent formatting

Some rows have "123 Main St, Chicago, IL 60601" and others have just "123 Main St Chicago".

Before geocoding, scan column A for addresses missing a comma separator between street and city — add a comma where the city name starts — then geocode all rows using Mapbox and write results into columns B, C, and D.

About sixty rows are missing state or ZIP

Geocode all rows in column A using Mapbox. For any row where state and ZIP appear to be missing, attempt geocoding using the city name alone and flag those rows in column E with "CITY ONLY" to indicate lower precision.

The addresses are split across two worksheets

One worksheet has domestic prospects, another has international accounts, and both need coordinates.

Geocode all addresses in column A of the Domestic worksheet using Mapbox and write lat, lon, and place name into columns B, C, and D. Do the same for column A of the International worksheet. Then combine both result sets into a new worksheet called Geocoded All, preserving the original row data.

The full cleanup-and-geocode pipeline

Clean column A by trimming whitespace and removing redundant apartment number suffixes that appear after a hyphen. Then geocode each address using Mapbox and write latitude into column B, longitude into column C, place name into column D, and a confidence flag into column E. Finally, sort all rows by column E so LOW CONFIDENCE rows appear at the top for review.

One prompt handles data prep and geocoding in sequence.

Try It

Get the 7-day free trial of SheetXAI and open the prospect workbook you have been avoiding — ask SheetXAI to geocode column A through Mapbox. You can also explore the reverse geocoding article or return to the Mapbox overview for the full list of geographic tasks.

Stop memorizing formulas.
Tell your spreadsheet what to do.

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

Learn more