Back to ipdata.co in Google Sheets
SheetXAI logo
ipdata.co logo
ipdata.co · Google Sheets Guide

Classify IPs by Continent and EU Membership in a Google Sheet Using ipdata.co

2026-05-14
5 min read

The Scenario

You are a compliance manager at a company with 10,000 user IP addresses sitting in Google Sheets from the past quarter's signups. Legal has asked you to classify each IP as EU or non-EU and assign a continent code before the data residency policy review on Monday. The policy determines where user data gets stored. Getting the classification wrong is not a minor error.

This is not the third time this week someone has asked you to do something that should have been automated. It is the fifth.

The bad version:

  • Try to find a downloadable IP-to-country database, convert it to a format Sheets can VLOOKUP, discover the file is 4 GB.
  • Write an Apps Script that calls an IP geolocation API one row at a time. After two hours, it has processed 800 rows and the script hit a quota limit.
  • Export the IPs to CSV, run them through a third-party tool, reimport the results, and discover the row order shifted during the import.

The Monday meeting has three attorneys in it. Arriving with a classification methodology that involves a CSV shuffle and fingers crossed is not going to hold up.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent that lives inside your Google Sheet. It reads the IP column, calls ipdata.co for continent and EU-membership fields, and writes the classification results back into the columns you specify.

For each IP in column A, fetch the continent name and is_eu flag from ipdata.co and write them to columns B and C.

What You Get

  • Column B: continent name string (e.g., "Europe," "North America," "Asia")
  • Column C: boolean EU membership flag (true for EU-resident IPs, false for all others)
  • Every row covered — no silent failures, no row-order shifts
  • Filter on column C = true to get your EU subset immediately

What If the Data Is Not Quite Ready

You need continent code rather than name for the data routing system

Look up all IPs in column A using ipdata.co. Write the continent code to column B (e.g., "EU," "NA," "AS") and TRUE/FALSE for EU membership to column C. Add a count of EU vs. non-EU records in a summary below the data.

The sheet has duplicate IPs from users who signed up multiple times

Deduplicate column A by IP address. Then enrich each unique IP with ipdata.co for continent code and EU membership flag, writing to columns B and C.

You need to cross-reference a previously classified subset to catch inconsistencies

Enrich all IPs in column A with ipdata.co continent code and EU flag, writing to columns B and C. Then compare column A against the Prior-Classification tab column A — for any IP that appears in both, write "MATCH" or "MISMATCH" in column D based on whether the EU flags agree.

Kill-chain: deduplicate, enrich, compare prior classification, and produce a compliance summary

Deduplicate IPs in column A. Enrich each with ipdata.co continent code and EU membership flag — writing to columns B and C. Compare against Prior-Classification tab and write MATCH or MISMATCH in column D. Add a compliance summary on a new tab: total IPs, EU count, non-EU count, mismatch count, and percentage of mismatches.

One prompt produces the classification dataset and the compliance summary your legal team needs.

Try It

Get the 7-day free trial of SheetXAI and open your user IP sheet, then ask SheetXAI to classify each IP by continent and EU membership using ipdata.co. See also running a GDPR-compliant EU enrichment pass or the ipdata.co integration overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more