The Scenario
You're three hours into a network operations review when a senior engineer drops a new sheet in the shared drive: 300 rows, client IP in column A, server IP in column B, and a note that says "we need the geographic distance between each pair for the latency baseline." The context is a pre-launch infrastructure audit. The presentation to the engineering VP is tomorrow morning.
The bad version:
- Look up the latitude and longitude of the first client IP via IP2Location, look up the server IP, paste both coordinate pairs into a great-circle distance calculator, copy the result, paste it into column C.
- Do that 299 more times.
- Realize that the great-circle formula in the calculator rounds differently than the one your colleague used last quarter, so the numbers won't match the previous report they're comparing against.
300 pairs at that pace is a full day of work. The VP meeting is in sixteen hours.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent that lives inside your Google Sheet. It reads both IP columns and through its built-in IP2Location integration geolocates each address, computes the great-circle distance between each pair, and writes the result to column C — across all 300 rows.
For each row in my sheet, calculate the great-circle distance between the IP in column A and the IP in column B using IP2Location and write the distance in kilometers to column C.
What You Get
- Column C: great-circle distance in kilometers between the client and server IP pair in that row
- Rows where one or both IPs return no geolocation result get a clear "unable to resolve" marker in column C so you can spot coverage gaps
- Consistent rounding across all 300 rows — no formula drift between batches
What If the Data Is Not Quite Ready
I also need the individual coordinates written out for the report
For each row, use IP2Location to geolocate the client IP in column A and the server IP in column B. Write client latitude and longitude to columns C and D, server latitude and longitude to columns E and F, and the great-circle distance in kilometers to column G.
Some server IPs are from a reference list, not the same sheet
Geolocate all client IPs in column A using IP2Location, then match each client IP's location to the nearest datacenter IP from the "Datacenters" tab based on great-circle distance, and write the closest datacenter name and distance in kilometers to columns B and C.
I need results in miles, not kilometers
For each row, calculate the great-circle distance between the IP in column A and the IP in column B using IP2Location and write the distance in both kilometers and miles to columns C and D respectively.
Full kill chain — resolve, compute, flag latency outliers, and summarize
Geolocate client IPs in column A and server IPs in column B using IP2Location, write great-circle distance in kilometers to column C, flag any row where the distance exceeds 5,000 km with HIGH-LATENCY in column D, then add a summary below showing the average, minimum, and maximum distances across all pairs.
Everything the infrastructure report needs — resolved coordinates, distances, outlier flags, and summary stats — out of one prompt.
Try It
Get the 7-day free trial of SheetXAI and open any network audit sheet with client and server IP columns, then ask it to compute great-circle distances using IP2Location across every row before your review. You can also explore full geolocation enrichment for traffic analysis or return to the IP2Location overview for the complete integration guide.
