· Written and maintained by Nonimo
How to redact names in Excel before a spreadsheet reaches ChatGPT, Claude or Copilot comes down to one rule: change the values, not the view. Hiding a row, a column or a whole sheet, turning the font white or filling cells black leaves every name in the file, where any script that opens the workbook can still read it.
So the work is a sequence on a copy: unhide everything, replace or delete the names, clear notes and comments, then check the parts of a workbook that sit outside the grid.
A spreadsheet is the file people hand an AI tool when they want a total, a chart or a cleaner list, and it is also the file most likely to hold a whole population at once: every employee, every patient, every client, every resident. The same logic of deleting instead of covering runs through our guide to redacting in Word and the one on PDFs.
This one stays inside Excel. The menus below are the Windows ones, in Excel for Microsoft 365, named the way Microsoft’s support pages name them. Deciding which identifiers should go at all is a US list with its own guide.
How to redact names in Excel: eight steps on a copy
The order is chosen so that later steps have less to deal with. Unhiding first means your search for names runs over everything the file holds, not just what the window happens to show.
- Save a copy. Several steps below are destructive, and Microsoft warns that some cannot be undone.
- Unhide rows, columns and sheets. Right click a sheet tab and choose Unhide, then select the rows or columns on each side of every double line and choose Unhide again.
- Delete the columns you can do without. An SSN column rarely helps an AI summarize hours or spending.
- Replace names with codes. Store the list matching codes to people in a different file.
- Clear notes and comments. Replace does not reach them, so they need their own pass.
- Check headers, footers and sheet names. Rename a tab called after a client and open Page Layout view.
- Deal with PivotTables and links. Both can hold data that is not on any visible sheet.
- Run the Document Inspector. Last, on the copy, as a check on your own work.
Steps 2 to 7 each get a section below. The file’s properties, author and company among them, belong to our guide on metadata, and step 4 is pseudonymization in the sense of our guide to deidentified and anonymized data.
Hidden is still in the file: what our test workbook gave up
To see what hiding does, we built a small workbook with invented people. The visible sheet, Summary, lists three teams by headcount and hours. We hid one of its rows and the column naming each team lead.
We added a sheet called Staff with names and an SSN and hid it, and a sheet called Lookup with an email address and set it to very hidden, a state that is set through VBA code rather than from the menus.
Then we read the file with openpyxl, an open source Python library that pandas can use for .xlsx files. A few lines of code, no special options:
| What we hid | How it was hidden | Returned by the reader |
|---|---|---|
| The Front desk row | Hidden row | Yes, with its lead’s name |
| The Lead column | Hidden column | Yes, a name on every row |
| The Staff sheet | Hidden sheet | Yes, name and SSN |
| The Lookup sheet | Very hidden sheet | Yes, name and email |
That is the point of the whole guide. Excel chooses what to draw on screen, and a script parsing the file makes that call on its own. OpenAI’s help center says that for some data analysis tasks ChatGPT writes and runs Python code in a notebook environment that can use the files you make available.
We did not look inside ChatGPT, and OpenAI does not say what it does with a hidden sheet, so the safe reading is the one our test supports: assume hidden content can be read. What each vendor keeps from the upload afterward has its own answers, in our guides on ChatGPT and on Copilot.
The sheet the Unhide dialog does not list
Unhiding a normal sheet is quick: right click any tab and choose Unhide, or go to Home, Format, Hide & Unhide, Unhide Sheet. Microsoft notes a catch in the same article. A sheet set to very hidden through VBA does not appear in that dialog at all, and Microsoft’s advice for a workbook with macros is to ask its owner.
So if a workbook came from a colleague who uses macros, or from a system that exports reports, do not treat an empty Unhide list as proof. The check in the last part of this guide, reading the copy the way a program would, is the one that sees very hidden sheets.
Custom formats, white font and black fill
Three tricks make a cell look empty without emptying it. The first is a number format made of nothing but three semicolons (;;;), which blanks the cell on screen. Microsoft’s support article on hiding cell values is explicit about what stays: “their values remain displayed in the formula bar where you can work with them.”
White text on a white fill is the same idea done by hand. A black fill over black text is the spreadsheet version of a marker pen.
All three change formatting, and formatting is not what a reader extracts. They also fool the person checking: a quick scroll through the sheet looks clean while the workbook still carries every number.
A filter hides rows as well
Filters are the hiding nobody thinks of as hiding. Microsoft describes a filter as showing only the rows that meet your criteria and hiding the rest, which is exactly what a hidden row is. A sheet filtered to one department looks like a list of twelve people and still holds all three hundred.
Clear every filter on the copy before you look for names: select a cell in the data and turn Filter off on the Data tab. The Inspector lists active filters among the things it reports, which is a second chance to catch one.
Decide what the AI needs before you open the workbook
The fastest redaction is the column you never send. Most things people ask an AI tool about a spreadsheet need far less than the whole file: a chart needs a category and a count, a trend needs a period and a total. Before you unhide or replace anything, write the question down and list the columns that answer it.
| The question | Columns it needs | Columns it can do without |
|---|---|---|
| Which team logged the most overtime? | Team, hours | Names, SSNs, emails |
| How did claims move month to month? | Month, claim count | Claimant, policy number |
| Which invoices are overdue? | Invoice code, due date, amount | Client name, address |
| How busy is each clinic? | Clinic, visit count | Patient name, diagnosis |
Then copy just those columns into a new workbook and paste them as values. The hidden sheets, PivotTables and workbook links of the original stay behind, because none of them were copied. Unhide and unfilter the range before you copy it, so you can see every row you are taking.
Health care already works this way by rule. The HIPAA Privacy Rule tells health plans, providers and the vendors that handle records for them to make “reasonable efforts to limit protected health information to the minimum necessary to accomplish the intended purpose” of a use or disclosure.
The FTC’s guide for business, in its October 2016 edition, gives every company the same advice under the heading scale down. If you work in a practice or a billing office, the HIPAA side of AI tools and our page for healthcare cover the rest of that upload.
Where names hide in a workbook besides the cells
Once the grid is clean, the rest of the workbook still needs a look. These are the places, most of them on Microsoft’s own Inspector list, that hold content you may not see in Normal view:
| Where | How to see it | What to do |
|---|---|---|
| Notes and comments | Right click the cell, or the Comments button | Delete Comment or Delete Note |
| Headers and footers | Insert, Header & Footer | Clear the name or file path |
| Sheet tab names | The tabs themselves | Rename tabs named after people |
| PivotTables | PivotTable Options, Data tab | Clear the saved source data |
| Workbook links | Data, Workbook Links | Break links you do not need |
| Named ranges | Formulas, Name Manager | Delete names that point to people |
| Charts | Select the chart, check labels | Fix titles and data labels |
The Inspector’s list, further down, covers most of these rows. Metadata in the file properties is the one layer this table leaves to the metadata guide, and whether a black box protects anything in a legal sense is another guide’s subject.
Sheet tabs and page headers
Two places carry names without looking like data. A tab named after a client, or a workbook with one sheet per employee, puts names in the structure of the file, and a reader lists the sheet names along with their contents. Rename each tab to something neutral, such as the code you gave that person.
Headers and footers are the other. Normal view never draws them; according to Microsoft’s article on headers and footers, you meet them only after switching to Page Layout or previewing a printout. So a name or a network path typed there years ago can sit in every copy of the file unseen. Open Insert, Header & Footer on each sheet and clear it.
Comments, notes and the reviewer’s name
Excel for Microsoft 365 has two kinds of annotation. Notes are the yellow boxes older versions called comments; threaded comments are the newer kind with a Reply box. For notes, Microsoft’s comparison page says the name can be edited out. For threaded comments it says the opposite: “You cannot remove or change your name.” So a comment thread carries the names of everyone who took part in it, whatever the cell says.
To get rid of one, open the cell’s right click menu and pick Delete Comment for a thread or Delete Note for a note. The Comments button, next to Editing on the ribbon, lists the threads so none is missed. Do this before the search for names, not after, because Replace will not look inside either kind. A Word report that travels with the workbook needs the same pass, tracked changes included.
A PivotTable can carry its own copy of the rows
A PivotTable summarizes data, and to do that quickly Excel can keep a stored copy of the rows it summarizes inside the workbook. Microsoft’s advice on reducing file size describes the setting: select the PivotTable, open PivotTable Analyze, Options, then the Data tab, and clear Save source data with file.
That setting matters for redaction because the cache is data too. If you replaced names on the source sheet after building the PivotTable, refresh it, or better, turn the summary into plain values and delete the PivotTable from the copy you upload. A chart built on that PivotTable should be checked for names in its labels.
How to redact names in Excel with codes and a separate key
Deleting the name column is the cleanest option when the task does not need people at all. Often it does: you want the AI to spot the employee with the most overtime or the client with the oldest invoice, and you want to know who that is afterward. That is what a code is for.
Add a column next to the names, fill it with codes such as EMP-01 and EMP-02, and copy the name and code columns to a new workbook that you save somewhere else. That second file is the key. Then delete the name column from the copy you are preparing. The AI works with codes, and you translate its answer back with the key on your own machine.
Names written three ways in one column
If names also appear inside other cells, say a Notes column or a free text description, you need Find and Replace. Press Ctrl+H, open Options, set Within to Workbook, and search each person one at a time. Match entire cell contents is useful for a clean name column and harmful for free text, where a name sits inside a sentence.
The trouble is that people are rarely written one way. A single export can hold “Tennerby, Marisol” in one column, “M. Tennerby” in a comment, and the surname inside an email address. Search the surname alone and step through the hits with Find Next rather than trusting Replace All. And remember Microsoft’s note on the Replace tab: its Look in list only offers Formulas, so notes and comments need Find, not Replace.
Why the key stays out of the upload
A code only protects anyone while the key is somewhere else. Paste both into the same conversation and you have redacted nothing. The same goes for a hidden sheet holding the key inside the workbook you upload: our test file gave up a sheet just like it.
Keeping a key means you are pseudonymizing, not anonymizing: the people are still identifiable to you, and that is the point. For firms that do this every day with client ledgers, our page for CPA firms covers the confidentiality side, and our guide to deidentified and anonymized data explains why the two words are not interchangeable.
How to redact SSNs in Excel, and other number columns
Social Security numbers turn up in spreadsheets that have no business holding them. The FTC’s guide for business says it plainly: do not use Social Security numbers unnecessarily, for example as an employee or customer identification number. If your sheet uses the SSN as its key column, the fix is a new ID column, and the SSN column goes.
| Method | Does the number stay in the file? |
|---|---|
| Delete the column | No |
| RIGHT for the last four, paste values, delete the source | Only the last four digits |
| Number format ;;; | Yes, in the formula bar |
| Black fill or white font | Yes, unchanged |
Only the first two methods take the number out. The other two are the formatting tricks from earlier, and they fail the same way. For the other numbers that name a person, from driver’s license numbers to account numbers, the US list is in our guide on what personal information to remove.
Paste values before you delete the source
If a task truly needs the last four digits, add a column with a formula such as RIGHT on the SSN cell, then copy that column and paste it back as values. Microsoft’s page on replacing a formula with its result describes the Values Only paste option, and notes that the formula is removed for good once you do.
The order matters. A formula that points to the SSN column breaks the moment you delete that column, and the cell that looked fine now shows an error. Paste values first, check that the digits are still there, and only then delete the full numbers. Agency files carry SSNs more often than most, which is why our page for insurance agents starts from the file itself.
Columns that point to one employee without naming anyone
Removing names and SSNs still leaves work. A row with a date of birth, a five digit ZIP code and a job title can describe exactly one person in a small office, and a spreadsheet makes that easy to see because every field sits in its own column.
HIPAA’s safe harbor method is the most detailed US rule on this. Its list, in section 164.514 of the Privacy Rule, cuts a ZIP code to its first three digits, and even those go if the area they cover holds 20,000 people or fewer. Every element of a date except the year comes out, and ages over 89 are grouped into one category of 90 or older.
It reaches past the patient too: the same identifiers of a relative, an employer or someone in the household have to go. In a staff roster, that is the emergency contact column.
Small groups are where this bites. If a sheet breaks pay down by team and one team has a single member, that row identifies its one member just as a name column would. The same goes for the only employee over 65, or the one contractor in a given state. Look for any category with one or two rows and merge it into a larger one before you upload.
Outside health care nobody makes you apply that list, but it is a useful yardstick. If your task is about staffing, it does not need birth dates; if it is about regions, it may need only the state. Where health data ends and other personal data at work begins gets its own treatment in our guide on PHI and PII in HR files.
Coarsen the column instead of deleting it
You do not always have to throw a column away. Replace a birth date with a birth year using a formula, then paste values. Cut ZIP codes to three digits, or to the state. Group job titles into bands such as manager, staff and contractor. Each change keeps what the analysis needs and loses what points to one person.
Dates deserve care for another reason. Microsoft’s page on the DATE function explains that Excel stores dates as sequential serial numbers, so a birth date can sit in a column that no longer looks like one once its formatting changes. It is still a birth date to anyone who converts it back, so treat the column as dates, not as harmless figures. Our HIPAA guide has the full list of eighteen identifiers.
Excel’s Document Inspector: the list it checks, and no undo
After your own cleanup, run the Inspector on the copy. Open File, then Info, then Check for Issues, and choose Inspect Document. For Excel, Microsoft lists what it looks for:
- comments and annotations, including ink;
- document properties and personal information;
- headers and footers;
- rows, columns and whole worksheets set to hidden;
- invisible content, custom XML data and embedded files;
- external links, macros and VBA code;
- PivotTables, PivotCharts, slicers and other features with cached data;
- filters, scenarios and hidden names.
Microsoft attaches two warnings. What the Inspector removes may be gone for good, since Undo might not bring it back. The second is worth quoting in full: “If you remove hidden rows, columns, or worksheets that contain data, you might change the results of the calculations or formulas in your workbook.”
That is a real risk in a financial model, where a hidden helper sheet feeds the totals you are about to send.
So use it as a check, not as the method. If it reports hidden rows you did not expect, go back and look at them before letting it delete anything. The properties it clears are explained in our metadata guide, and the Word version of this tool has its own quirks in the Word guide.
Check the copy the way a program would
The last check is the one our test pointed to: look at the copy the way software will, not the way Excel draws it. Four checks, in order, take a few minutes.
- Count the sheets. Right click a tab and choose Unhide. If it is available, something is still hidden.
- Search the whole workbook. Ctrl+F, Within set to Workbook, Look in set to Values, then Notes, then Comments, for each surname you removed.
- Break or remove links. Data, Workbook Links, Break links; Microsoft says the formulas that used them become their current values.
- Read the file with a program if you can. Anyone with Python can list every sheet and row with openpyxl in a few lines, including very hidden sheets.
A law firm will want this as a written step before anything is uploaded, which is part of what our law firm page describes. Knowing how to redact names in Excel is only half of that step; proving the copy is clean is the other half. And if the destination is Claude rather than ChatGPT, Anthropic’s terms are set out in our guide on Claude and your data.
What reaches the clipboard when Nonimo reads a payroll sheet
Nonimo is installed on the computer you work at, Mac or Windows. Pick the workbook in the Finder or in File Explorer and press Nonimo’s keyboard shortcut. The clipboard then holds the sheet as text, with the names and numbers Nonimo recognizes covered by placeholders, ready to paste into the AI. Paste the answer back and the names return.
From an Excel file you get the masked text to paste, and you can download a masked copy that is still an Excel workbook; on a Mac, the save dialog opens in the original’s folder. For an old .xls, save it as .xlsx and Nonimo takes it from there.
Here is a payroll sheet we made up, with its third row hidden and Gross pay as a formula, next to the text Nonimo produced from it:
The sheet, row 3 hidden in Excel
Name SSN Email Hours Rate Gross pay
Marisol Tennerby 000-38-6705 38 33 1254
Corliss Vandegrift cvandegrift@example.com 40 29 1160
What Nonimo put on the clipboard
Name SSN Email Hours Rate Gross pay
[PERSON_1] [REFERENCE_1] 38 33 1254
[PERSON_2] [EMAIL_1] 40 29 1160
The hidden row came through, and so did the pay figure Excel had calculated, not the formula behind it. The placeholders are pseudonyms, so the names come back in the answer, and hours, rates and pay stay readable for the AI to work with. What Nonimo keeps on the machine is described on our security page; the license page lifts the monthly word limit.
Sources
- Microsoft Support, Remove hidden data and personal information by inspecting documents, presentations, or workbooks. The Inspect Document button (File > Info > Check for Issues); the Excel list; Undo may not restore removed content; the warning about calculations and formulas. support.microsoft.com
- Microsoft Support, Hide or show rows or columns. Right click the selection and choose Hide or Unhide; the double line that marks a hidden column. support.microsoft.com
- Microsoft Support, Hide or unhide worksheets. Right click a tab and choose Unhide, or Home > Format > Hide & Unhide > Unhide Sheet; sheets set to xlSheetVeryHidden by VBA do not appear in the Unhide dialog. support.microsoft.com
- Microsoft Support, Hide or display cell values. The ;;; format, and the sentence on values that remain displayed in the formula bar. support.microsoft.com
- Microsoft Support, Find or replace text and numbers on a worksheet. Ctrl+H; Within: Sheet or Workbook; Look in offers Formulas, Values, Notes and Comments, and only Formulas on the Replace tab. support.microsoft.com
- Microsoft Support, The difference between threaded comments and notes. Notes let you edit the name; threaded comments do not. support.microsoft.com
- Microsoft Support, Insert comments and notes in Excel. Delete Comment and Delete Note from the right click menu; the Comments button next to Editing shows all comments. support.microsoft.com
- Microsoft Support, Filter data in a range or table. Filtered data shows only the rows that meet your criteria and hides the rest; Data > Filter turns it off. support.microsoft.com
- Microsoft Support, Headers and footers in a worksheet. Insert > Header & Footer opens Page Layout view; headers and footers are visible only in that view, in print preview and in printouts. support.microsoft.com
- Microsoft Support, Reduce the file size of your Excel spreadsheets. PivotTable Analyze > Options > Data, and the Save source data with file setting for the PivotTable cache. support.microsoft.com
- Microsoft Support, Manage workbook links. Data > Queries and Connections > Workbook Links; breaking a link turns the formulas that used it into their current values. support.microsoft.com
- Microsoft Support, Replace a formula with its result in Excel. Paste Options > Values Only; replacing a formula with its value removes the formula permanently. support.microsoft.com
- Microsoft Support, DATE function. Excel stores dates as sequential serial numbers so that they can be used in calculations. support.microsoft.com
- OpenAI Help Center, Data analysis with ChatGPT. For some data analysis tasks ChatGPT writes and runs Python code in a notebook environment that can use files made available to the session. help.openai.com
- pandas documentation, read_excel. openpyxl is one of the engines pandas can use for newer Excel file formats. pandas.pydata.org
- FTC, Protecting Personal Information: A Guide for Business (October 2016). Scale down, keep only what you need; do not use Social Security numbers unnecessarily, for example as an employee or customer identification number. ftc.gov
- 45 CFR 164.502(b), HIPAA minimum necessary. Reasonable efforts to limit protected health information to the minimum necessary to accomplish the intended purpose. ecfr.gov
- 45 CFR 164.514(b)(2), HIPAA safe harbor. Three digit ZIP codes only for areas above 20,000 people; all date elements except the year; ages over 89 grouped as 90 or older; identifiers of relatives, employers and household members. ecfr.gov
- Nonimo test workbooks, September 28, 2026. Invented .xlsx files built with openpyxl, read with openpyxl 3.1.5 and run through Nonimo.
Nonimo is the software that does this on your own computer: it masks client names and IDs before your text reaches ChatGPT. No account needed, and the app does it without your files leaving your machine.
Common questions
How to redact names in Excel so they do not come back?
Work on a copy and change the values themselves: unhide every row, column and sheet, then swap every name for a code or remove the column outright. Clear notes and comments, look over headers, footers and PivotTables, and run Inspect Document last (File, Info, Check for Issues). Hiding, white font and black fill only change the view. Nonimo can then cover what it recognizes in the text you paste.
Is a hidden column in Excel still in the file?
Yes. Excel keeps every value of a hidden column in the workbook, and bringing them back takes a right click and one menu item. In our test file, a hidden column, a hidden row, a hidden sheet and a very hidden sheet all came back from a short Python script. Delete the column, or replace its values, before the file leaves your computer.
Can ChatGPT read hidden sheets in an Excel file?
OpenAI does not document how it treats hidden sheets. What it does say is that for some data analysis tasks ChatGPT writes and runs Python code on the files you give it. In our test, openpyxl, a Python library pandas can use for .xlsx files, returned every hidden sheet without any special option. Plan as if hidden content will be read.
How do I redact Social Security numbers in Excel?
When the job can be done without the number, delete the column. If it needs the last four digits, build them with RIGHT, paste the result as values, and then delete the original column. A custom number format or a black fill hides nothing: Microsoft notes the value stays in the formula bar. The FTC also warns against using SSNs as employee IDs at all.
Does Find and Replace in Excel search comments and notes?
Find can: its Look in list offers Formulas, Values, Notes and Comments. Replace cannot, because Microsoft says only Formulas is available on the Replace tab. So a name typed into a note survives Replace All. Search notes and comments with Find, set Within to Workbook, and edit or delete each hit by hand before you save the copy.
Which hidden items does Excel's inspector look for?
Microsoft's Excel list runs from comments, ink and the file's properties to anything in a header or footer, rows, columns or whole sheets left hidden, invisible objects, external links, embedded files, macros, and PivotTables or other features with cached data, among others. It warns that removed content may not come back with Undo, and that deleting hidden rows or sheets can change formula results. Run it on the copy, after your own cleanup.
Is swapping names for codes enough to anonymize a spreadsheet?
Not by itself. A code with a key kept somewhere is pseudonymization: whoever holds the key can reverse it. And a row can still single out someone through a birth date, a ZIP code and a job title together. Store the key apart from the spreadsheet, in a file that never goes out with the upload, and coarsen the columns that narrow a row down to one employee.
Can Nonimo work on an .xlsx file I have not cleaned up?
Yes. Pick the workbook in File Explorer or the Finder and press Nonimo's keyboard shortcut. The clipboard then holds the sheet as text, with the names and numbers Nonimo recognizes covered by placeholders, and the names come back when you paste the answer in. Hidden rows are read, and so are the values Excel saved. For an old .xls, save it as .xlsx first.