How to Anonymise Excel/Google Sheets & Shopify Data
Some of the most useful findings in a sales audit come from your customer data: who comes back, how often, what they spend, and where they live. Understandably, many brand owners hesitate before handing over spreadsheet rows filled with real names, emails, and home addresses.
The good news is that you do not have to expose private data. With ten minutes in Google Sheets or Excel, you can strip every trace of personally identifiable information (PII) from your export while keeping the one thing that matters for analysis: the ability to track repeat-purchase behaviour.
Short on time? We can handle this for you
If you would rather skip the spreadsheet work, we can anonymise your data for you under a strict Non-Disclosure Agreement (NDA). Send us your raw file, and we will securely process it locally before generating your audit. Skip to the bottom to see how our secure service works, or read on for the step-by-step guide.
What we need to keep
The value in your data is not in knowing that Sarah in Leeds bought a lamp. It is in knowing that Customer 47 has ordered four times, spends more on each visit, and always uses a discount code. The goal is simple: replace every identity with a unique code, ensuring that the same customer receives the exact same code across every order row.
A simple find-and-replace will not do this reliably. The steps below will.
Step 1: Export your orders
- Log into Shopify, navigate to Orders, and click Export.
- Select CSV for Excel, Sheets, or other spreadsheet applications and export all orders.
- Open the downloaded CSV file in Excel or Google Sheets.
- Locate the column containing customer emails. In a standard Shopify export, this is typically Column B (titled Email).
Step 2: Build the customer map
- Create a new tab at the bottom of your spreadsheet and name it "map".
- In your new "map" tab, click cell A1 and type
Real Email. Click cell B1 and typeCustomer ID. - In cell A2, extract every unique email from your main order sheet (assuming your main tab is named "Orders"):
Google Sheets & Modern Excel:
=UNIQUE(Orders!B2:B)
Next, generate a matching set of unique codes. In cell B2 of your "map" tab, enter this formula and drag it down alongside your email list:
Customer ID Formula:
="CUST-" & TEXT(ROW()-1, "0000")
This creates clean, sequential identifiers like CUST-0001, CUST-0002, and so on.
Step 3: Map the anonymised IDs back to your main sheet
Return to your main sheet ("Orders"). Insert a new blank column right next to the original Email column and title it Anonymised ID.
In cell C2, enter a lookup formula to pull the matching code from your "map" tab for each order:
Lookup Formula:
=XLOOKUP(B2, map!A:A, map!B:B, "Guest")
(If you use an older version of Excel without XLOOKUP, use =VLOOKUP(B2, map!A:B, 2, FALSE) instead.)
Double-click the fill handle (the small green square in the bottom-right corner of cell C2) to apply this formula down the entire column. Every order placed by the same customer will now show their matching CUST code.
Step 4: Lock the formulas and strip out the PII
Before deleting any sensitive columns, you must convert your formulas into static text. Otherwise, removing the email column will break your lookup formulas.
- Highlight your new
Anonymised IDcolumn. - Copy the selection (Ctrl + C on Windows / Cmd + C on Mac).
- Without changing your selection, right-click and choose Paste as Values (or Paste Special > Values Only).
Now that your codes are locked in as plain text, safely delete the original columns containing real names, emails, phone numbers, and street addresses.
Pro Tip on Geography: Location trends are vital for sales audits. Do not delete broad location columns like City, County, Country, or the first half of the postcode (for example, LS1 instead of LS1 4DY). This preserves valuable geographical insights while completely masking individual households.
Step 5: Export your clean audit file
- Save a master copy of your spreadsheet on your secure local drive. This keeps your "map" tab intact if you ever need to re-identify top customers later.
- Delete the "map" tab from the file you plan to share.
- Save the clean file under a new name, for example
Shopify_Orders_Anonymised.csv.
In under ten minutes, you have turned a sheet of sensitive personal data into an anonymised dataset ready for Claude, ChatGPT, or an external auditor. You get total analytical clarity on customer lifetime value and repeat purchase patterns, while your customers' privacy stays completely protected.
Would you prefer us to do this for you?
If you do not have the time to edit spreadsheet formulas, we are happy to manage the data anonymisation process on your behalf as part of your audit.
We eliminate any worry about handling confidential information through strict data privacy controls:
- Signed NDA First: We sign a legally binding Non-Disclosure Agreement before you share a single file with us.
- Secure UK Processing: Your raw data is stored and processed locally within a secure, encrypted UK environment. It is never uploaded to public AI tools or unencrypted cloud servers.
- Complete File Purge: Once your anonymised dataset is created and the audit is complete, all original raw files are permanently wiped from our systems.