The Scenario
You're a market research analyst and you've just been handed a sheet of 300 retail site candidates — each one a lat/lng pair — with a question attached: how many direct competitors are within 1 km of each location?
The site selection committee meets Friday. You got this dataset Wednesday afternoon.
The bad version:
- Open Google Maps, drop a pin at the first coordinate pair, manually look at what's nearby, count the relevant businesses
- Switch back to the sheet, type the count into the adjacent column
- Repeat 299 more times, each time mentally filtering the map results to only your competitor category
By row 40, you're approximating. By row 80, you're guessing. By row 120, you've stopped caring whether "nearby" means within the circle or just visible on the current zoom level.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent inside your Google Sheet that reads your coordinates and calls the Google Maps Nearby Search API for each row. You describe what you want appended — count, names, distances — and it writes it back.
For each row in my Google Sheet with a latitude and longitude, search for nearby grocery stores within 1 km using Google Maps and write the count and the names of the top 3 results into the adjacent columns
What You Get
- A competitor count appears in the next empty column for each row
- The names of the top 3 nearby results appear in the following columns
- Rows where the search returns zero results show "0" rather than blank — so absence of competitors is recorded, not missing
- Column headers are written automatically
What If the Data Is Not Quite Ready
Some rows have coordinates in a single column as "lat, lng" text instead of two separate columns
In my Google Sheet, column A holds coordinates as text strings like "37.7749, -122.4194". Split each string into lat and lng, search for nearby coffee shops within 500 meters using Google Maps, and write the closest result's name, rating, and distance into columns B, C, and D.
The search should use different radii depending on the site type listed in column C
For each row in my Google Sheet, use the site type in column C to determine the search radius: "urban" sites use 300 meters, "suburban" sites use 800 meters, "rural" sites use 2,000 meters. Search for nearby pharmacies using Google Maps at the appropriate radius and write the count into column D.
Results need to be filtered to only businesses with a rating above 4.0
Run a Google Maps nearby search for restaurants within 750 meters of each lat/lng pair in my Google Sheet. Filter the results to only include places with a rating of 4.0 or higher, and write the count of qualifying results and the name of the top-rated one into the next two columns.
Full competitive density report: count by category, top name, distance, and open-now status — all in one pass
For each site coordinate in my Google Sheet, search for nearby competitors in three categories: "supermarket", "convenience store", and "pharmacy" — all within 1 km using Google Maps. Write a separate count column for each category, plus the name and distance of the closest result in each category. Add a flag in the last column if any category has 5+ results.
The pattern: ask for the filtering, the categorization, and the writeback all at once.
Try It
Get the 7-day free trial of SheetXAI and open your site candidate sheet — then ask it to run the nearby search across all rows. For the coordinates themselves, see how to geocode addresses to lat/lng before running proximity searches.
