The Scenario
You're a retail analyst. The logistics team sent you a request Monday morning: they're running a last-mile delivery study and need to know which of last month's online orders fall into which regional delivery zones. You have 4,000 order records in an Excel workbook — order ID in column A, customer IP at checkout in column B. A delivery zone lookup table is in Sheet2. The study report goes to the operations director Friday.
Postal code is the linking field. IPinfo can return the postal code for any IP. Sheet2 maps postal codes to zone names. The join is straightforward — it's the enrichment step that needs doing first.
The bad version:
- Write a script to call the IPinfo single-IP endpoint for 4,000 orders.
- Wait through 4,000 sequential API calls (or restructure to use batch calls, which requires reading the batch endpoint docs).
- Parse postal code from each JSON response, export to CSV, import into Excel, join on order ID.
4,000 individual API calls at standard rate limits can take 10-20 minutes of wait time alone. The join is a 2-minute VLOOKUP once the data is in. Most of the calendar time goes toward the plumbing.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent inside your Excel workbook. It calls IPinfo for every IP in your column, writes the postal code to column C, and handles the Sheet2 VLOOKUP in the same prompt.
Open the SheetXAI sidebar with the order workbook open and paste:
For each IP in column B, use IPinfo to retrieve the postal code and write it to column C, then use VLOOKUP to match postal codes against the delivery zone table in Sheet2 and write the zone name to column D.
What You Get
- Column C: postal code for each order IP (e.g., "10001", "90210", "SW1A 1AA")
- Column D: delivery zone name matched from Sheet2 for each postal code
- Rows where IPinfo returns no postal code get empty cells in C and D — not errors — easy to flag for manual review
- All 4,000 rows handled in one pass, including the zone join
What If the Data Is Not Quite Ready
Multiple orders share the same IP and I want to deduplicate for the API call
Many order IPs in column B repeat across rows. Deduplicate column B, look up postal codes via IPinfo for unique IPs, cache the results on a lookup worksheet, then VLOOKUP the postal code back to column C for every row and use a second VLOOKUP to write the zone name from Sheet2 to column D.
Some postal codes aren't in the delivery zone table
Look up postal code for each IP in column B using IPinfo, write to column C. VLOOKUP against Sheet2 to find the delivery zone and write to column D. For any row where VLOOKUP finds no match, write "Zone Not Mapped" in column D instead of an error.
International orders need to be handled separately from domestic
Fetch postal code and country for each IP in column B using IPinfo. Write postal code to column C and country code to column D. For rows where country is not "US," skip the zone VLOOKUP and write "International" in column E. For US rows, VLOOKUP the postal code against Sheet2 and write the zone to column E.
Full logistics study pipeline
Column B has 4,000 order IPs. Look up postal code and country via IPinfo. Write postal code to column C, country to column D. For US orders, VLOOKUP against Sheet2 to get the delivery zone and write to column E; flag non-matched US postal codes as "Zone Not Mapped." For non-US orders, write "International" in column E. Write a summary worksheet called "Zone Distribution" with zone name and order count per zone, sorted by count descending.
From raw IP column to operations director-ready study input in one prompt.
Try It
Get the 7-day free trial of SheetXAI and open any Excel workbook with customer or order IP addresses, then ask it to append postal codes from IPinfo and match them against your delivery zone or regional classification table. See also timezone enrichment for client scheduling or company identification from visitor IPs. Hub: IPinfo + Excel.
