Excel password protection can lock you out of your own spreadsheets when you forget the password or inherit a file without credentials. This guide covers legitimate methods to remove or bypass worksheet, workbook, and file-level passwords using built-in Excel features, VBA, and third-party tools, with clear steps for each scenario.
What You’ll Need
- Microsoft Excel (2013 or newer recommended)
- For VBA methods: access to the Visual Basic for Applications editor (Alt+F11)
- For file-level passwords: a third-party password recovery tool (e.g., Passware, Hashcat) or a hex editor
- A backup copy of the file (always work on a copy)
Step-by-Step
Method 1: Remove Worksheet Protection (No Password Known)
- Open the Excel file and navigate to the protected worksheet.
- Press Alt+F11 to open the VBA editor.
- In the left Project Explorer, find your workbook (e.g., VBAProject (YourFile.xlsx)).
- Right-click the workbook name and select Insert > Module.
- Copy and paste the following code into the module:
- Press F5 or click Run to execute the macro.
- Close the VBA editor. The worksheet protection is now removed.
Sub UnprotectSheet()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Protect UserInterfaceOnly:=False
ws.Unprotect Password:=""
Next ws
End Sub
Method 2: Remove Workbook Structure Protection
- Open the workbook and press Alt+F11.
- Insert a new module as in Method 1.
- Paste this code:
- Run the macro (F5). The structure protection is gone.
Sub UnprotectWorkbook()
ThisWorkbook.Unprotect Password:=""
ThisWorkbook.Protect Password:=""
End Sub
Method 3: Bypass File Open Password (Encrypted File)
- Create a backup copy of the encrypted file.
- Use a dedicated password recovery tool. For example, Passware Kit or Hashcat can attempt to crack the password.
- If you know part of the password, use a mask attack in Hashcat to reduce time.
- If the password is simple (e.g., short, dictionary word), try an online service like LostMyPass (upload the file, they attempt to recover).
- If you prefer a manual method, use a hex editor to remove the password hash from the file (advanced, only works on older .xls files).
Method 4: Remove Password from a Shared Workbook
- Open the workbook and go to Review > Protect Share Workbook.
- If the password dialog appears, click OK without entering a password (sometimes works if the password is blank).
- If that fails, use VBA: in the VBA editor, run
ActiveWorkbook.UnprotectSharing.
Common Mistakes
- Forgetting to work on a copy – you may corrupt the original file.
- Using the wrong method – worksheet vs. workbook vs. file-level protection require different approaches.
- Assuming VBA works on file-open passwords – VBA only removes worksheet/workbook protection, not encryption.
- Running macros with a blank password – if the password is not blank, this won’t work; you need the actual password or a cracking tool.
- Overlooking the “read-only recommended” password – that’s just a suggestion, not real protection.
Tips
- Always keep a backup of the original file before attempting any removal.
- If you forget a password, try common passwords you use (e.g., “password”, “1234”) before resorting to tools.
- For file-level encryption, the only reliable way is brute-force or dictionary attacks; choose a strong password next time to avoid this.
- If you only need to view data, try opening the file in Google Sheets or LibreOffice – they sometimes ignore weak protection.
- Use the Info > Protect Workbook menu to set a new password after removing the old one.
Troubleshooting
- VBA macro doesn’t run: Ensure macros are enabled. Go to File > Options > Trust Center > Trust Center Settings > Macro Settings > Enable all macros.
- “Password is incorrect” when trying to unprotect with blank password: The sheet has a real password; you must use a password recovery tool or guess.
- File is corrupted after hex editing: Restore from backup and try a different method.
- Third-party tool can’t crack the password: The password is too complex; try a longer dictionary list or a mask attack with known patterns.
- Workbook structure still protected after macro: Run the macro again after closing and reopening the file; sometimes the protection is reapplied.
Frequently Asked Questions
Can I remove a password if I don’t know it?
Yes, for worksheet and workbook protection, the VBA method works regardless of the password. For file-open encryption, you must use a password cracking tool.
Is it legal to bypass Excel passwords?
It’s legal if you own the file or have permission from the owner. Bypassing protection on someone else’s file without consent may violate laws.
Will these methods work on Excel files from older versions?
Yes, the VBA methods work on .xls and .xlsx files. Hex editing only works on older .xls files with weak encryption.
What is the difference between worksheet and workbook protection?
Worksheet protection restricts editing of cells, while workbook protection locks the structure (adding, moving, deleting sheets).
Can I recover a forgotten password for a file-open password?
Yes, but it may take time. Simple passwords can be cracked in minutes, complex ones may take days or be impossible.
Does removing protection affect the data in the file?
No, removing protection only removes the restrictions; all data and formatting remain intact.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Fix Missing Scroll Bar in Chrome
- Fix Sony Vegas Crashing on Windows 10
- Fix Outlook Sent Items Missing? Quick Solutions
- Hide WhatsApp Channel: Android & iOS Guide
- Slow Context Menu in Windows 11: Fixes
- Declutter Safari on iPhone: 15 Quick Tips