Spreadsheets

Remove account numbers and personal details before sharing a sheet

A checklist of places personal data hides in a statement spreadsheet, plus a masking formula, so you can share the sheet without exposing account numbers.

Editorial illustration for Remove account numbers and personal details before sharing a sheet

Before you share a statement spreadsheet, remove or mask the account number, your name, phone number and any identifiers inside narrations, then check the places most people forget: header rows, hidden sheets, comments and the file's own properties. Masking with a formula is fine for display, but you must paste values over the original, otherwise the full number is still in the file.

Where does personal data hide in a statement sheet?

Work through these in order on a copy of the file:

  • Header rows above the table: bank statement exports often carry your name, address, account number and sometimes email or phone at the top.
  • Narration or description columns: UPI references can contain a person's name, a mobile number or a UPI ID.
  • Other columns: cheque numbers, reference numbers and branch details.
  • Hidden sheets, rows and columns: right-click a sheet tab, choose Unhide, and select all rows and columns to unhide them.
  • Comments and notes added by you or by someone you got the sheet from.
  • The file name and the sheet tab names.
  • Headers and footers in Page Layout view, which print on every page.
  • Document properties: author name, company and the folder path, which you can see under File, Info.
  • Pivot tables and query connections that still hold a copy of the source data or a file path with your username.

How do I mask an account number with a formula?

If the account number is in A2, this shows only the last four digits:

=REPT("X",LEN(A2)-4)&RIGHT(A2,4)

Suppose A2 holds 123456789012. LEN is 12, so REPT gives eight X characters, and RIGHT gives 9012. The result is XXXXXXXX9012. Fill it down the column.

Two details matter. First, if the number was stored as a number, Excel may have dropped leading zeros; check against your statement. Second, the masked column is a formula that still points at the original. Select the masked column, copy it, use Paste Special, Values, and then delete the original column. Otherwise the full number remains one click away.

What about names and numbers inside narrations?

Use Find and Replace (Ctrl+H). Search for your name and replace it with "SELF". Search for a relative's name and replace it with "FAMILY". For mobile numbers you can search with a wildcard such as 98????????? in Excel, where each question mark stands for one character, but check each hit before replacing so you do not alter a genuine amount. In Google Sheets use Edit, Find and replace, and tick "Search using regular expressions" for more control.

Alternatively, if the reader only needs categories, delete the narration column entirely and keep date, amount and category.

How do I know nothing is left?

  1. Save the cleaned copy under a new name.
  2. Press Ctrl+F, search for the first four digits and last four digits of your account number, and search in Workbook, not just the sheet.
  3. Search for your surname, your city and your mobile number's first few digits.
  4. Run File, Info, Check for Issues, Inspect Document, and clear what it finds.
  5. If you can, send the cleaned copy to yourself and open it on another device.

Keep the original statement sheet untouched in a private folder, and give the shareable version a name that says it is masked, such as statement-masked-2026-04. That way you never attach the wrong one in a hurry.

When to hold back instead

Some people ask for full statements: a lender, a landlord, an authority. In those cases do not mask what they have asked for; send it through their official route and keep a record of what you sent. If you are unsure who should see your account details, ask them why they need them first.

If the sheet exists only because statements are awkward to analyse, SpendixAI lets you upload the statement, review rows and download a CSV of the columns you pick, without passing the raw statement around.

SPENDIXAI JOURNAL

Useful ideas start with a clearer picture of your own spending.

Explore your reports