Unlocking and editing a protected Excel sheet is straightforward once you understand the protection methods. If your sheet is password-protected (including Excel 365’s built-in security), removing protection requires a workaround. For shared files with only sheet-level protection (without passwords), you can bypass restrictions entirely. This guide shows you how to safely edit any protected sheet without losing data.
What You'll Need
You’ll need:
- The protected Excel file (no extra software needed except Microsoft Excel or Office 2016+)
- Your computer running Windows, macOS, or a modern browser (Excel Online) (passwords require Excel on desktop)
- If using Excel Online, you’ll need a Microsoft account to sign in (passwords won’t work here)
- If the sheet is only protected against editing (not password-protected), you may need to unlock the Workbook Protection first
Step-by-Step
For Password-Protected Sheets (Excel 2016+)
-
Open the Excel file in Microsoft Excel (desktop version). Go to
File > Infoand clickUnprotect Sheetin the ribbon. If this fails: The sheet is password-protected, not just sheet-level protection. Try the next method. -
Use VBA to remove the password (works on Windows only):
- Press
Alt + F11to open the VBA editor. Go toInsert > Moduleand paste this code: - Close the VBA editor and reopen the file. If prompted, enter the original password and then a new password (or leave it blank if you want no password).
Sub RemovePassword() Dim oldPass As String, newPass As String oldPass = Application.InputBox("Enter password:", "Password", "", Type:=2) If oldPass = "" Then Exit Sub newPass = Application.InputBox("Enter new password:", "New Password", "", Type:=2) If newPass = "" Then Exit Sub ActiveSheet.Unprotect oldPass ActiveSheet.Protect Password:=newPass, _ AllowFormattingCells:=True, _ AllowFormattingRows:=True, _ AllowFormattingColumns:=True, _ AllowInsertingRows:=True, _ AllowInsertingColumns:=True, _ AllowDeletingRows:=True, _ AllowDeletingColumns:=True, _ AllowSorting:=True, _ AllowFiltering:=True End Sub - Press
- Edit the sheet freely after protection is removed. If the sheet was locked from deleting rows/columns or formatting, the VBA code above also unlocks those features.
For Sheets Only Locked Against Editing (No Password)
-
Open the Excel file in Excel. Go to
Review > Unprotect Sheetand enterblank(just press Enter). If this fails: The entire workbook is locked, not just the sheet. Try this next: -
Unlock the workbook structure:
- Press
Alt + F11, go toVBAProject (YourWorkbook), and delete the line in theThisWorkbookmodule that says:Private Sub Workbook_Open() ThisWorkbook.Unprotect Password:="[password]" ' or leave blank if no password End SubIf it doesn’t exist, skip to step 4 below. - Save the file. Now you can edit the sheet normally—no protection remains.
- Press
-
If the above didn’t work, try this alternative:
- Go to
File > Info > Protect Workbook > Unprotect Workbook. Enterblankand clickOK. - If the file still locks, check if the
Workbook Protectionis set. Go toReview > Protect Workbookand enterblankto confirm removal.
- Go to
For Excel Online (Web Version)
- Sign in to your Microsoft account on Excel Online (no password needed if using a personal account). Open the file in a browser.
-
Right-click the sheet tab > Unprotect Sheet. If prompted, enter
blankand clickOK. If the sheet is password-protected: Excel Online does not support bypassing passwords. Contact the file owner to share an editable copy.
Common Mistakes
1. Using the wrong password—if you enter an incorrect password, Excel won’t allow you to unprotect the sheet. Check for a trailing space or typos. 2. Editing the wrong worksheet—protection applies to the sheet tab, not the entire workbook. If you unprotected the wrong sheet, you’ll need to repeat the process. 3. Forgetting to save after VBA changes—VBA edits are saved automatically, but if you close Excel without saving, the password protection might reapply. 4. Using Excel Online with a shared password—only the owner can bypass passwords in the web version. Workbooks with passwords won’t work unless they’re downloaded to desktop first.
Tips
1. **Backup your file** before editing—if the protection re-applies or you accidentally delete data, restore from the backup.
2. **Check for VBA macros**—some files use macros to trigger protection. Disabling macros (via Review > Protect > Disable Macros) can prevent unintended re-locking.
3. **Use a browser extension** like "Edit Excel Online Without Password" (if supported) as a last resort, but this may violate licensing terms.
4. **For large files**, unprotecting via VBA can take a moment—be patient after running the macro.
5. **If the file is corrupted**, try opening it in a different version of Excel (e.g., Excel 2021 vs. 2019) to see if protection behaves differently.
Troubleshooting
Problem: "Unprotect Sheet" keeps failing with an error.
Solution: The sheet may be password-protected. Use the VBA method above to bypass it.
Problem: After running VBA, the sheet still locks rows/columns.
Solution: Ensure the protection settings in the code match your exact needs. The AllowFormatting... options must be set to True for full access.
Problem: Excel Online won’t let me unprotect a password-protected sheet.
Solution: Password protection in Excel Online is not removable. Share a copy without the password or use desktop Excel instead.
Problem: The file re-locks after editing.
Solution: Delete any VBA code that re-applies protection (e.g., the Workbook_Open event). Save the file as a new name to bypass hidden settings.
Problem: I get a "Permission Denied" error when editing.
Solution: The file may be locked by another user or system protection. Contact the owner or use a different computer to open it.
Problem: I accidentally deleted the password-protection VBA line, and the sheet is now fully editable.
Solution: You’re fine—no data was lost. The protection was removed entirely.
Problem: My file was created in Excel 365 with "Advanced Protection," and nothing works.
Solution: These files often require a Microsoft account to edit. Open the file in Excel Online with your account and sign in to share changes.
Frequently Asked Questions
Can I edit a protected Excel sheet without the owner’s permission?
Yes, but only if the protection is sheet-level (no password). Password-protected sheets require the original password or a VBA workaround. Microsoft does not support bypassing passwords via third-party tools, so official methods are your best option.
Will this method work on Excel for Mac?
No, the VBA method only works on Windows. For Mac, use the Review > Unprotect Sheet method or contact the file owner to remove protection manually.
What if I don’t know the password to unlock a protected sheet?
If the sheet is password-protected, there is no way to unlock it without the password. You must ask the file owner to share a copy without protection.
Does unprotecting a sheet permanently delete any data?
No, unprotecting only removes restrictions. Your data remains intact. If the sheet was accidentally locked, unlocking it just frees your edits.
Can I edit a protected sheet in Google Sheets?
Google Sheets does not support password protection for users. If the file is locked, the owner must grant editing permissions instead.
Is there a way to edit a locked Excel sheet without VBA?
For non-password sheets, you can use Review > Unprotect Sheet to remove sheet-level protection. Password protection can only be bypassed via VBA (desktop) or shared access (Excel Online).