The Scenario
You are a data ops analyst. Your company imports CRM records from three different sources, and the address data was stored in separate columns: street number in column A, street name in column B, city in column C, state in column D, ZIP in column E. You have 300 rows and need geocoded coordinates — latitude in column F, longitude in column G — so the sales team can load them into a territory-mapping tool. The request landed in your inbox an hour ago.
The bad version:
- Concatenate the five address columns into a single string, run it through a standard geocoding API.
- Discover concatenation breaks for rows with blank street numbers or ZIPs that Excel dropped the leading zero from.
- Look up the Mapbox Structured Forward Geocoding endpoint, discover the request format is different from the standard geocoding endpoint you know.
- Process 300 rows one at a time because you do not have a batch script.
The sales team wants coordinates by end of day to finalize territory assignments.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent that lives inside your Excel workbook. It reads the split address columns, sends each row to the Mapbox Structured Forward Geocoding endpoint using the correct field mapping, and writes coordinates back into columns F and G in one pass.
Use Mapbox structured forward geocoding to geocode each row using street number in column A, street in column B, city in column C, state in column D, and zip in column E — write latitude into column F and longitude into column G.
What You Get
- Column F with decimal latitude for each of the 300 rows.
- Column G with decimal longitude.
- Any row that cannot be matched gets GEOCODE FAILED in column F with the reason — missing city, ambiguous address, invalid ZIP.
What If the Data Is Not Quite Ready
ZIP codes lost their leading zeros in Excel
Before geocoding, check column E for any ZIP values with fewer than 5 digits and pad them with a leading zero. Then run Mapbox structured forward geocoding and write latitude into column F and longitude into column G.
About forty rows have the full street line in column B and nothing in column A
For rows where column A is blank, treat column B as the full street line and use Mapbox structured geocoding with just the street, city, state, and ZIP fields. For rows where column A has a value, geocode using all five structured fields. Write latitude and longitude into columns F and G.
You need the full formatted address written back as well as coordinates
Geocode all 300 rows using Mapbox structured forward geocoding. Write latitude into column F, longitude into column G, and the Mapbox-resolved full formatted address string into column H.
Full pipeline: fix ZIP zeros, flag incomplete rows, structured geocode, flag low-confidence matches, and sort failures to top
Pad any ZIP code in column E with fewer than 5 digits by adding a leading zero. Flag any row where columns A through E have more than two empty fields in column I as INCOMPLETE. For remaining rows, run Mapbox structured forward geocoding and write latitude into column F, longitude into column G, and formatted address into column H. Flag any row where geocode confidence is below 0.7 in column I as LOW CONFIDENCE. Sort the workbook so LOW CONFIDENCE and INCOMPLETE rows appear first.
One prompt handles data prep, geocoding, quality flagging, and output sorting.
Try It
Get the 7-day free trial of SheetXAI and open the next CRM import that lands in your inbox — bring the split address columns and ask SheetXAI to structured-geocode them through Mapbox in one pass. If those geocoded rows need to feed into a driving-time matrix or route optimization, those articles cover the downstream steps. The Mapbox hub lists every geographic workflow available.
