February 2026 7 min read Guide

How to Redact in Excel

Excel has no built-in redaction feature. Here are three methods to permanently remove SSNs, salaries, account numbers, and other sensitive data from spreadsheets — plus the hidden data that survives even after you delete cells.

⚠️ The critical mistake: Deleting a cell in Excel does not destroy the data. Undo history, cached formulas, hidden sheets, and .xlsx XML metadata can all preserve the original values. If you're sharing a spreadsheet with sensitive information, you need a permanent redaction method.

Tip: Don't have Excel installed? Use ModernPDF to convert your spreadsheet to PDF for free — no software required, and your file never leaves your browser.

Why Excel Makes Redaction Difficult

Unlike a PDF — where text is rendered as visual content — Excel stores data in structured XML inside a .xlsx container. This creates several redaction challenges that don't exist in other formats:

  • Formulas reference deleted cells. A formula like =A1&" "&B1 may still display a name even after you clear A1 and B1, if the result was cached.
  • Hidden sheets and rows. Spreadsheets frequently contain hidden worksheets with raw data, pivot table caches, or lookup tables that duplicate the data you're trying to redact.
  • Undo history. Excel maintains undo history within the session. If you send the file while it's still open, the recipient might be able to recover deleted content.
  • Named ranges. A named range like "SSN_List" persists even after the cells it references are cleared, and the name itself reveals what was there.
  • External connections. Data connections to databases or APIs can contain connection strings with credentials or query parameters that expose sensitive data structures.
  • Comments and notes. Cell comments often contain reviewer notes with names, dates, or context about the sensitive data.

Because of these layers, simply deleting cell contents is not redaction. You need to either strip the file completely or convert it to a format where the data can be permanently destroyed.

Method 1: Export to PDF + AI Redaction (Recommended)

This is the most reliable method. By converting to PDF first, you eliminate all of Excel's hidden data layers — formulas, undo history, hidden sheets, named ranges — and work with a flat visual document that can be permanently redacted.

  1. Prepare the spreadsheet. Unhide any rows or columns you want included in the final document. Select the print area to control what's exported. Check Page Layout → Print Area if you only want specific ranges.
  2. Export to PDF. Go to File → Save As → PDF (or File → Export → Create PDF/XPS). Choose "Standard" quality. Under Options, select "Entire Workbook" if you need all sheets, or "Selection" for specific ranges.
  3. Upload to SafeRedact. Open SafeRedact and drag your PDF into the browser. The AI automatically scans for SSNs, names, addresses, phone numbers, email addresses, account numbers, and other PII patterns — including those in table cells, headers, and footers.
  4. Review detections. The AI highlights every detected item with a category label. For spreadsheets, pay special attention to column headers (which may not be flagged as PII but could reveal data structure), row labels, and any cells marked as "financial" or "identifier."
  5. Apply and download. Click Apply. SafeRedact uses pixel-burn redaction — the sensitive data is permanently destroyed at the image level, not just covered with a black box. The resulting PDF cannot be reverse-engineered.

Why this method wins: PDF export strips all Excel metadata, formulas, hidden sheets, and undo history. AI detection catches PII patterns humans miss — especially in large spreadsheets with hundreds of rows. Pixel-burn redaction is permanent and irreversible.

Method 2: Manual Cleanup + Document Inspector

If you must share the file in .xlsx format (not PDF), this method strips hidden data but requires careful manual work. It's less reliable than the PDF method because you're relying on Excel's own tools to find everything.

  1. Delete sensitive cell contents. Select the cells containing PII. Press Delete to clear contents, then right-click → Clear Contents and Clear Formats. This removes both the value and any formatting that might hint at the original data.
  2. Check for hidden sheets. Right-click any sheet tab → Unhide. If sheets are "Very Hidden" (only accessible via VBA), press Alt + F11 to open the VBA editor, select the sheet in the Project Explorer, and change its Visible property to xlSheetVisible. Delete any hidden sheets containing sensitive data.
  3. Clear named ranges. Go to Formulas → Name Manager. Delete any named ranges that reference sensitive data or have revealing names.
  4. Remove data connections. Go to Data → Queries & Connections. Delete any connections to external data sources, especially those containing database credentials or API keys.
  5. Run Document Inspector. Go to File → Info → Check for Issues → Inspect Document. Check all categories and click Inspect. Remove all findings: comments, document properties, personal information, hidden rows/columns, custom XML, and invisible content.
  6. Save as a new file. Do a Save As with a new filename. This prevents the original data from being recoverable through the file's undo history or previous versions.

⚠️ Limitation: Document Inspector cannot selectively redact specific cell values. It strips metadata and hidden properties, but if you missed a cell during manual deletion, that data will still be in the file. For spreadsheets with thousands of rows, manual review is error-prone.

Method 3: VBA Macro for Pattern-Based Removal

For large spreadsheets with predictable PII patterns (SSNs, phone numbers, email addresses), you can use a VBA macro to find and replace them programmatically. This is faster than manual deletion but only catches patterns you define.

  1. Open the VBA editor. Press Alt + F11. Insert a new module: Insert → Module.
  2. Paste the redaction macro:
    Sub RedactSSNs()
        Dim ws As Worksheet
        Dim cell As Range
        For Each ws In ThisWorkbook.Worksheets
            For Each cell In ws.UsedRange
                If Not IsEmpty(cell.Value) Then
                    ' Match SSN pattern: XXX-XX-XXXX
                    If cell.Value Like "###-##-####" Then
                        cell.Value = "[REDACTED]"
                    End If
                End If
            Next cell
        Next ws
        MsgBox "SSN redaction complete."
    End Sub
  3. Run the macro. Press F5 or go to Run → Run Sub. The macro scans every cell in every sheet and replaces matching patterns.
  4. Still run Document Inspector. The macro only handles cell values. You still need Document Inspector (Method 2, Step 5) to strip metadata, comments, and hidden properties.

Limitation: VBA pattern matching is rigid. An SSN formatted as "123456789" (no dashes) or stored as a number won't match the "###-##-####" pattern. Names, addresses, and unstructured PII can't be caught by regex. This method works best as a supplement to AI-powered redaction, not a replacement.

Which Method Should You Use?

Criteria PDF + AI Redaction Manual + Inspector VBA Macro
Permanence ✓ Pixel-burn, irreversible Depends on thoroughness Cell values replaced
Hidden data ✓ All stripped by PDF export Inspector catches most ✗ Not addressed
AI detection ✓ Finds SSNs, names, addresses ✗ Manual only Pattern-only
Output format PDF (read-only) ✓ .xlsx (editable) ✓ .xlsx (editable)
Speed (1,000 rows) ~30 seconds 30–60 minutes ~5 seconds
Best for Sharing, compliance, legal Internal cleanup Bulk pattern removal

Our recommendation: Use Method 1 (PDF + AI) for anything you're sharing externally — with landlords, lenders, opposing counsel, auditors, or compliance teams. The PDF format eliminates hidden data risks, and AI detection catches PII that manual review misses. Use Methods 2 or 3 only when you need to keep the file in .xlsx format for continued editing.

Common Excel Redaction Scenarios

HR: Employee rosters and payroll

Payroll spreadsheets contain SSNs, salaries, bank account numbers for direct deposit, and home addresses. When sharing headcount data with managers or auditors, export to PDF and redact everything except names, departments, and titles. See our guide on redacting employee documents.

Finance: Transaction logs and account statements

Bank transaction exports in .csv or .xlsx contain account numbers, routing numbers, and transaction details. When submitting bank statements for loan applications or visa processing, redact account numbers and non-relevant transactions. See what to redact on a bank statement.

Legal: Discovery spreadsheets

During litigation, spreadsheets may need to be produced with certain columns or rows redacted — trade secrets, privileged communications, or third-party PII. Export relevant sheets to PDF, redact with SafeRedact, and produce the redacted PDF. The document redaction software handles multi-page PDFs from large spreadsheets.

Real estate: Rent rolls and financial summaries

Property managers often share rent rolls with prospective buyers or lenders. These contain tenant SSNs, lease terms, and payment histories. Redact tenant PII while keeping financial summaries visible. See redacting tenant documents.

Frequently Asked Questions

Can you redact in Excel?

No. Excel has no built-in redaction tool. You can delete cell contents and use Document Inspector to strip metadata, but this doesn't guarantee permanent removal. For secure redaction, export to PDF and use a dedicated tool like SafeRedact.

How do I remove sensitive data from an Excel spreadsheet?

Three approaches: (1) Delete cells and run Document Inspector, (2) use VBA macros to find and replace PII patterns, or (3) export to PDF and use AI-powered redaction. Method 3 is the most thorough because it eliminates all hidden data layers and uses AI to catch PII patterns humans miss.

Does Excel have a Document Inspector?

Yes. Go to File → Info → Check for Issues → Inspect Document. It finds and removes comments, personal information, hidden rows/columns, custom XML data, and invisible content. However, it cannot selectively redact specific cell values — it only strips metadata and hidden properties.

What hidden data does Excel store?

Excel files can contain: author name, company name, edit history, comments, hidden sheets, hidden rows/columns, named ranges with sensitive references, external data connections, VBA macros with hardcoded credentials, pivot table caches with source data, and cell formulas that reference removed data.

Can I redact a .csv file?

CSV files are plain text with no hidden layers, so you can edit them directly in any text editor. However, for visual redaction (black boxes over specific fields), convert to PDF first — either open in Excel and export, or use ModernPDF's free converter — then redact with SafeRedact. This gives you a visual audit trail of what was redacted.

How do I redact a Google Sheets spreadsheet?

Google Sheets has no redaction feature. Download as PDF (File → Download → PDF), then redact with SafeRedact. For other spreadsheet formats (.csv, .xls, .ods), use ModernPDF to convert to PDF first — it handles all common file types, free, in your browser.

Redact Sensitive Spreadsheet Data in 30 Seconds

Export your spreadsheet to PDF. Drop it into SafeRedact. AI finds SSNs, names, and account numbers. One click to permanently destroy them.

Try SafeRedact Free
Found this useful?
Link copied!