The Scenario
A direct mail marketer is three weeks out from a regional campaign launch across 5 cities. She needs every postal code within a 10km radius of each launch location so the print vendor can build the geo-targeted mailing lists. Her usual approach is to Google each city, find a radius mapping tool, manually copy out the postcode list, paste it into the workbook, and repeat. She has done this before. It took most of a Tuesday, and she missed two postcodes that were only partially within the radius and had to re-order a batch of mailers.
The bad version:
- Find a postcode radius API, authenticate, figure out the right radius unit and location format, and make a separate call for each of 5 cities.
- Parse the returned postcode arrays — which are different lengths for each city — and figure out how to store variable-length lists in a single Excel column.
- Merge the five lists, deduplicate postcodes that appear in multiple radii, and format the final list the way the print vendor expects it.
Campaign planning is already running behind because the creative approval took two weeks. The postcode list is the last thing blocking the vendor briefing.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent that runs inside your Excel workbook. It reads the city coordinates, calls Geoapify's postcode API for each location with the radius you specify, and writes the postcode lists into the correct cells.
Use Geoapify postcode listing for each of the 5 locations in the Regions sheet — find all postcodes within the specified radius in column C and dump them into column D as a comma-separated list
What You Get
- Column D receives a comma-separated list of all postcodes within the specified radius for each city row.
- The count of postcodes found is written into column E so the marketer can sanity-check the coverage before sending to the vendor.
- Cities that returned no postcodes within the radius are flagged rather than left blank.
What If the Data Is Not Quite Ready
The city coordinates need to be geocoded from city names first
Geocode each city name in column A with Geoapify to get the coordinates, then find all postcodes within 10km of each coordinate and write the comma-separated postcode list into column B and the count into column C
The radius should differ per city based on a column in the workbook
For each row in the Regions worksheet, use Geoapify to find all postcodes within the radius specified in column C of each city coordinate in columns A and B — write the postcode list into column D and the count into column E
The output should be deduplicated across all 5 cities into a single master list
Find all postcodes within 10km of each of the 5 city coordinates in this workbook using Geoapify, combine all results into a single deduplicated list, and write it into a new worksheet called Master Postcodes — one postcode per row with a column indicating which cities it belongs to
Geocode cities, fetch postcodes, deduplicate, and produce a vendor-ready summary in one pass
Geocode the 5 city names in column A with Geoapify, fetch all postcodes within the radius in column B for each city, deduplicate the combined list, and write the results into a Vendor List worksheet with one postcode per row and a comma-separated Cities column showing which campaign zones each postcode covers
The geocoding, radius search, deduplication, and formatting all happen in a single instruction.
Try It
Get the 7-day free trial of SheetXAI and open any Excel workbook with campaign launch cities, delivery zones, or regional office locations and ask it to pull the postcodes within your target radius. See the related spoke on generating static map thumbnails for each location, or return to the Geoapify hub.
