Skip to main content

Unprotect Excel Sheet (With or Without a Password)

Locked out of a worksheet? Learn the fastest fixes, from entering your password to solving a greyed-out Unprotect Sheet button.
· 8 min read

Explore with AI

Excel includes a feature that lets us lock worksheets to prevent unwanted changes. This is designed to protect important data like financial records, reports, or shared files. This keeps things organized and prevents mistakes, especially when multiple people use the same document.

But sometimes, we may have to modify a protected sheet to update information, which can only be done by first unprotecting the sheet. In this guide, I’ll walk you through different methods to unprotect an Excel sheet, whether you have the password or not.

Unprotect an Excel Sheet When You Have a Password

To unprotect an Excel sheet when you have a password:

  1. Go to the Review tab in the ribbon and click on Unprotect Sheet. 
  2. Enter the password in the pop-up and click OK. 

This works for both individual sheets and entire workbooks. If the whole workbook is protected, the process is similar. The only difference is that instead of choosing Unprotect Sheet, click Protect Workbook under the Review tab and repeat step 2. 

unprotecting the sheet with a known password in Excel.

Unprotect the sheet with a password. Image by Author.

Unprotect an Excel Sheet When You Don’t Have a Password

If we’ve forgotten the password of our sheet or received a locked Excel sheet, we can try to unprotect it in a couple of ways. Do know that modern versions of Excel use advanced encryption methods that are not so easy to bypass, but the following methods that we will explore might help.

Method 1: Using VBA code

If a protected sheet is locked and we don’t have the password, we can try unlocking it using a VBA macro. This is a brute-force approach and might only work with simple passwords. Also, don’t be surprised if it takes a long time to work through the possible combinations. 

  1. First, save the workbook to an older version of Excel. Go to File > Export > Change File Type > Excel 97-2003.  

  2. Open the protected sheet and press Alt + F11 to open the Visual Basic for Applications (VBA). 

  3. In the left panel, select the protected sheet (in my case, it's Employee Data) and paste the following password-breaking macro.

Sub UnprotectSheet()
    Dim i As Integer, j As Integer, k As Integer
    Dim l As Integer, m As Integer, n As Integer
    Dim password As String
    
    On Error Resume Next
    
    For i = 65 To 90
        For j = 65 To 90
            For k = 65 To 90
                For l = 65 To 90
                    For m = 65 To 90
                        For n = 65 To 90
                            password = Chr(i) & Chr(j) & Chr(k) & Chr(l) & Chr(m) & Chr(n)
                            ActiveSheet.Unprotect password
                            If Err.Number = 0 Then
                                MsgBox "Sheet Unprotected! Password Found: " & password, vbInformation, "Success"
                                Exit Sub
                            End If
                        Next n
                    Next m
                Next l
            Next k
        Next j
    Next i
    
    MsgBox "Could not unlock the sheet.", vbExclamation, "Failed"
End Sub
  1. Click Run or press F5 to run the macro and wait for the process to complete. The macro will generate a new password, which may not be the original but can still unlock the sheet. 

  2. Click OK, and the sheet will be unprotected.

Once done, if the file format was changed earlier, rename it back to .xlsx to restore full functionality.

Unprotecting the sheet using VBA macro  in Excel.

Crack the password using VBA macros. Image by Author.

In this last example, I'm looking for a password that I know is six characters long. If you're less sure about the password, you would need a different VBA script. Something too broad would take too long, and something too specific might not work, so be prepared to have to make several tries.

Method 2: Changing the file extension to ZIP

If VBA didn’t work or you’d rather not run a macro, another way to remove sheet protection is by editing the file’s internal structure. Excel files are compressed folders that contain multiple XML files, which means we can unlock a sheet by modifying the right one. Here’s how:

  1. Create a backup/copy of your Excel file. 

  2. In the File Explorer, right-click the copied Excel file, select Rename, and change file extension from .xlsx to .zip. If a Rename pop-up appears, click Yes to confirm.

Changing the xlsx file to a zip file in windows explorer in Excel.

Change the xlsx file to a zip file. Image by Author.

  1. Open the zip file, and head over to the xl → worksheets folder. There you will see all the XML files.

Locating to the XML file inside the zip folder in Excel.

Locate the XML file inside the zip folder. Image by Author.

  1. Locate the protected sheet’s XML file. If unsure which sheet is protected, open each XML file using Notepad or another text editor. Press Ctrl+F and search for the word protection. If the file contains a <sheetProtection> tag, this means the file is protected.

  2. Now delete the entire <sheetProtection> tag, including the opening < and closing >. Press Ctrl +S to save the file.

Unprotecting the sheet using the zip file extension in Excel.

Unprotect the sheet using the zip file extension. Image by Author.

  1. When closing the text editor, confirm any prompts to save modifications in the archive. Then, close the ZIP file.

  2. Rename the file back from .zip to .xlsx.

Excel stores sheet protection settings inside these XML files. By removing the <sheetProtection> tag, we disable the lock without affecting the rest of the workbook. This method is quick, doesn’t require coding, and works even when we don’t know the password.

Method 3: Using Google Sheets

If you’re looking for the easiest way to remove sheet protection — without coding or modifying files — Google Sheets is a great option. When you upload a protected Excel file, Google Sheets automatically removes sheet protection so we can edit it freely.

  1. Go to Google Drive and upload the locked Excel file.
  2. Right-click the file and select Open with > Google Sheets.
  3. Google Sheets will open the file, and any worksheet protection will be removed.
  4. Make any necessary edits.
  5. To save it back as an Excel file, go to File > Download > Microsoft Excel (.xlsx).

Since Google Sheets does not support Excel’s sheet protection feature in the same way, it automatically removes the restrictions when converting the file. This makes it an easy, no-hassle solution.

How to Unprotect All Sheets at Once

Excel has no built-in command to unprotect every sheet in one step. The Unprotect Sheet button is also greyed out when more than one sheet tab is selected. If you know the password, you have three options.

For a few sheets, unprotect them one at a time. Click each sheet tab, go to Review > Unprotect Sheet, and enter the password.

For many sheets that share a password, use a short macro.

  1. Press Alt + F11 to open the VBA editor.
  2. Go to Insert > Module and paste the macro below.
  3. Press F5, then enter the password when the box appears.
Sub UnprotectAllSheets()
    Dim ws As Worksheet
    Dim pw As String
    pw = InputBox("Enter the sheet password:")
    For Each ws In ActiveWorkbook.Worksheets
        ws.Unprotect Password:=pw
    Next ws
End Sub

The macro stops with an error if a sheet has a different password, and it skips sheets that aren’t protected. It doesn’t affect chart sheets. When you’re done, save the file as .xlsx, and Excel will remove the macro.

Add-ins such as Kutools for Excel can also do this, but they require installing third-party software.

How to Unlock Specific Cells in a Protected Sheet

If you want the sheet to remain protected but still edit specific cells, here’s how you can do it:

Suppose I have a dataset, and I want to share it with my client so they only write their address without editing anything else. To do so, first unprotect the sheet using any of the above methods. Then select the entire sheet by pressing Ctrl+A or the All Button. Now press Ctrl+1 to open the Format Cell, go to the Protection tab, and uncheck the Locked option. 

Unlocking all the cells in the sheet in Excel.

Unlock all the cells in the sheet. Image by Author.

Now select all the columns except the Address column, lock them so the other person doesn't use them, and open the Format Cell window again (Ctrl+1) and check the Locked option under the Protection tab. On the review tab, select Protect Sheet and enter the password. This protects the entire sheet except the ones I unlocked and allows the user to edit only specific ranges.

TIP: To select the non-adjacent rows, hold the Ctrl key and select the cells. To select the adjacent rows or columns, just drag the cursor over the column headers. 

Protect and unprotecting specific cells in the Excel sheet.

Protect specific cells in the sheet. Image by Author.

When You Can’t Unprotect an Excel Sheet

If you cannot unprotect an Excel sheet, there are a few important things to consider:

  • Cannot Remove Encryption: If the workbook is encrypted with a password, there’s no way to remove it without knowing it. Excel has no built-in option to bypass encryption, so you're stuck if you don’t have the password.
  • Complex Passwords May Not Be Recoverable: Some VBA scripts can unlock protected sheets, but they may not work if the password is strong or highly secure. If the script fails, other manual methods may not be effective either.
  • Backup Files Before Editing: Before you try anything, save a backup copy of the file. If something goes wrong, you may lose your data because editing XML files or running VBA macros can damage the file.

Why Is Unprotect Sheet Greyed Out in Excel?

If Unprotect Sheet is greyed out, something is blocking the command. Match what you see to the problems below, then follow the fix.

  • The sheet isn’t protected: If the Review tab shows Protect Sheet instead of Unprotect Sheet, there’s nothing to unprotect. Locked cells only matter once a sheet is protected. If you still can’t edit, check the other problems below.
  • The file is in Protected View: Files from email and the web often open with a yellow bar at the top that says Protected View. Click Enable Editing, and the button should become active.
  • The file is Marked as Final: If a bar at the top says Marked as Final, click Edit Anyway.
  • Your sheets are grouped: When the title bar shows [Group], Excel limits what you can do. Right-click any selected tab and choose Ungroup Sheets.
  • The workbook is shared: In a legacy shared workbook, the title bar shows [Shared], and you can’t protect or unprotect sheets. Go to Review > Share Workbook (Legacy), clear the box that allows changes by more than one user at the same time.
  • A cell is in edit mode: If your cursor is blinking inside a cell, most of the ribbon is greyed out. Press Enter or Esc, then check the Review tab again.
  • The file is open in a browser or Teams: Many buttons can be disabled when a file is open in your browser or in Teams. Choose Open in Desktop App (or Open in Excel) and try again there.
  • None of these match: If you’ve ruled out everything above, close the file and start Excel in Safe Mode, which turns off add-ins. On Windows, hold Ctrl while you launch Excel, then open the file. Once the button is active, click it and enter the password.

Quick Comparison of Methods

Here is a table that I hope you find helpful. It's a summary of the different methods we discussed. 

MethodPassword needed?DifficultyWorks on encrypted files?Best for
Review > Unprotect SheetYesEasyYesWhen you know the password
VBA macroNoModerateNoSimple passwords on older Excel formats
ZIP file methodNoModerateNoRemoving sheet protection from .xlsx files
Google SheetsNoEasyNoQuick fix without coding

Final Thoughts

If you have the password, the fix takes a few clicks: Review > Unprotect Sheet. If the button is greyed out, one of the causes above is usually responsible.

If you’ve lost the password to your own file, the methods above may help with older or simpler protection, but modern Excel encryption can’t be bypassed. A password manager and a backup copy of important files will save you the trouble next time.

Only use these methods on files you own or have explicit permission to unlock. Bypassing protection without permission may violate company policies, terms of service, or even legal regulations. For work files, ask your IT team instead.

If you want to learn more about data, I recommend the Data Analysis in Excel course and the Data Preparation in Excel course. They’ll help you get better at organizing and analyzing data easily.

Laiba Siddiqui

Author

Laiba Siddiqui

I'm a content strategist who loves simplifying complex topics. I’ve helped companies like Splunk, Hackernoon, and Tiiny Host create engaging and informative content for their audiences.

FAQs

Can I copy data from a protected Excel sheet to another worksheet?

Yes, if the sheet allows Select locked cells and Select unlocked cells. Select all used cells with Shift + Ctrl + End, copy with Ctrl + C, then paste into a new worksheet with Ctrl + V. External links to other workbooks may break and need manual recreation.

How do I find locked or unlocked cells in an Excel sheet?

You can use the CELL() function to check if a cell is locked or unlocked.

  • Enter the formula in any cell: =CELL("protect", A1)

  • If it returns 1 (TRUE), the cell is locked, and 0 (FALSE) means unlocked.

How do I highlight locked or unlocked cells in Excel?

You can use Conditional Formatting to highlight locked or unlocked cells:

  • First, unprotect your sheet.

  • Select the range to check.

  • Go to Home > Conditional Formatting > New Rule.

  • Use these formulas:

             For locked cells: =CELL("protect", A1)=1

             For unlocked cells: =CELL("protect", A1)=0

  • Choose a highlight color and apply the rule.

Topics

Related