PDF download Download Article PDF download Download Article

Do you need to view or edit a protected Excel worksheet? If the sheet is locked with a password and you're not sure what it is, you can easily use Google Sheets or a VBA script (in earlier versions of Excel) to remove the password. This wikiHow article will show you how to unlock a protected Excel spreadsheet with or without the password. If your entire Excel workbook is password-protected and you can't open it, you'll need to unlock the file first.

Method 1
Method 1 of 4:

Using Microsoft Excel

PDF download Download Article
  1. Open the workbook with a protected sheet in Microsoft Excel. You can usually do this by double-clicking the file's name on your computer.
  2. Each sheet's tab appears along the bottom of Excel. The protected sheet often has a padlock icon in some versions of Excel. Right-click the tab (or the lock icon) to open the context menu.[1]
    • If multiple sheets are protected, you'll need to remove protection on each sheet separately.
    Advertisement
  3. If the sheet is not password-protected, it will unlock immediately. If not, you'll be prompted to enter a password into a pop-up window.[2]
  4. If the password is correct, the sheet will become unprotected.[3]
    • If you don't know the password, see the Using Google Sheets method. This method lets you upload the file to Google Sheets, which removes all protections added in Excel.
    • If you're using Excel 2010 or earlier and prefer not to upload to Google Sheets, see the Using VBA Code in Excel 2010 and Earlier method.
  5. Advertisement
Method 2
Method 2 of 4:

Uploading to Google Sheets

PDF download Download Article
  1. Go to https://drive.google.com in a web browser. If you have a Google account, you can use Google Sheets (a free online app that's similar to Excel) to remove protection from all sheets in a workbook—even if you don't know the password.[4]
    • If you're not already signed into your Google account, follow the on-screen instructions to sign in now.
    • If you don't have a Google account, see How to Make a Google Account.
  2. It's at the top-left corner of the page.
  3. This opens your computer's Open panel.
  4. This uploads the file to your Google Drive.
  5. You'll probably have to scroll down to find it. This opens a preview of the file.
  6. It's at the top of the preview. A menu will expand.
  7. Now that the file is open for editing in Google Sheets, any sheet protections added in Excel have been removed.
  8. If you want to keep working on the file in Microsoft Excel rather than Google Sheets, you can download this newly-unprotected version of your workbook using the following steps:
    • Click the File menu at the top-left corner of your sheet.
    • Click Download As.
    • Click Microsoft Excel (.xlsx) .
    • Select a folder to save the file. If you want to keep the original version of the file (the one with a protected sheet) intact, type a new name for the file as well.
    • Click Save to download the file.
  9. Advertisement
Method 3
Method 3 of 4:

Using an Online Service

PDF download Download Article
  1. To get the whole file, you'll need to enter a license key.
  2. Advertisement
Method 4
Method 4 of 4:

Using VBA Code in Excel 2010 and Earlier

PDF download Download Article
  1. You can usually do this by double-clicking the file's name on your computer. Excel files usually end with the file extension .xls or .xlsx.
    • Use this method if you have already tried unlocking a sheet but found that it's password-protected (and you don't know the password).
    • This method will not work in Excel 2013 or later.
  2. If the file you're working on has the ".xlsx" extension (common if it was created or edited in newer versions of Excel), you'll only be able to use this method if you first convert it to the Excel 97-2003 (.xls) format. Here's how to do this:
    • Click the File menu at the top-right corner.
    • Click Save As.
    • Go to the folder in which you want to save the file.
    • Select Excel 97-2003 (.xls) from the "Save as type" or "File Format" menu.
    • Click Save.
    • Follow the on-screen prompts to make any necessary conversions.
  3. It's at the top of the left panel. Make sure you right-click the option that contains the file's name (ends with ".xls"), which should be at the top. A menu will expand.
  4. Another menu will expand.
  5. This inserts a new module in which you'll paste some code.
  6. 7
    Copy the code. Highlight the code that follows this text, then press Ctrl+C (PC) or Command+C to copy it:[5]
    Sub PasswordBreaker()
    'Breaks worksheet password protection.
        Dim i As Integer, j As Integer, k As Integer
        Dim l As Integer, m As Integer, n As Integer
        Dim i1 As Integer, i2 As Integer, i3 As Integer
        Dim i4 As Integer, i5 As Integer, i6 As Integer
     
        On Error Resume Next
        For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
        For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
        For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
        For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126
             ActiveSheet.Unprotect Chr(i) & Chr(j) & Chr(k) & _
                Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
                Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
             If ActiveSheet.ProtectContents = False Then
                MsgBox "Password is " & Chr(i) & Chr(j) & _
                    Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
                    Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
             	Exit Sub
             End If
        Next: Next: Next: Next: Next: Next
        Next: Next: Next: Next: Next: Next
    End Sub
    
  7. The copied code now appears in the module window.
  8. Excel will now run the code, which can take several minutes. Once the code is finished running, a new password will appear on a pop-up window.[6]
    • The new password will be a random number of "As" rather than the original password.
  9. A new password will appear but you won't need to write it down. Clicking OK will remove sheet protection automatically.[7]
    • If you had to convert the file to an earlier format, you can now save the workbook again as an .xlsx file.
  10. Advertisement

Community Q&A

Search
Add New Question
  • Question
    What if I forgot the password to the document?
    Community Answer
    Community Answer
    Try to use method 2 above (Uploading to Google Sheets). The downloaded Excel sheet from Google Sheets will be unprotected, so no password is needed.
  • Question
    The Google sheet method is not working.
    Margot Fontenaut
    Margot Fontenaut
    Community Answer
    It won't work for a password to open the document, but it works fine for passwords restricting shared access. If you can open your file, but can't edit it, this method will work. If you can't open you file without entering password, it won't work. In such case you will need to use password cracking tools like Password-find, Rixler password cracker, Password recovery lastic to remove protection from your file. It's impossible to restore or bypass a password to open the document without special software.
  • Question
    I received Compile error Syntax error.
    Margot Fontenaut
    Margot Fontenaut
    Community Answer
    You need to delete the phrase Breaks worksheet password protection. Compiler don't understand it and there you have the compile error cause of the syntax error. If VBA code is not your thing, you can use password removal apps like Password-find or Password Lastic to remove the password from your sheet.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement

Video

Tips

Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!

You Might Also Like

Merge Cells in Excel Merge Cells in Microsoft Excel: A Quick Guide
Unhide All Rows and Columns in Microsoft Excel
Use If‐Else in Excel Use If‐Else in Microsoft Excel: Step-by-Step Tutorial
Insert Pictures in Excel That Automatically Size to Fit Cells Insert Pictures in Excel That Automatically Size to Fit Cells
Create a Mortgage Calculator With Microsoft ExcelCreate a Mortgage Calculator With Microsoft Excel
Create a Graph in Excel Create a Graph in Excel
Unhide Columns in Excel Show Hidden Columns in Microsoft Excel & Unhide Column A
Ethernet Doesn't Have a Valid IP Configuration Fix Ethernet Doesn't Have a Valid IP Configuration on Windows
Freeze Cells in Excel3 Easy Ways to Freeze Panes to Lock Columns or Rows in Excel
Change from Lowercase to Uppercase in Excel Change from Lowercase to Uppercase in Microsoft Excel
Make a Spreadsheet in ExcelMake a Spreadsheet in Excel
Use ExcelNew to Excel? Here's Super Easy Tricks to Get You Started
Link Sheets in ExcelLink Sheets in Excel
Make a List Within a Cell in ExcelThe Best Ways to Make & Format Lists in Excel
Advertisement

About This Article

Nicole Levine, MFA
Written by:
wikiHow Technology Writer
This article was co-authored by wikiHow staff writer, Nicole Levine, MFA. Nicole Levine is a Technology Writer and Editor for wikiHow. She has more than 20 years of experience creating technical documentation and leading support teams at major web hosting and software companies. Nicole also holds an MFA in Creative Writing from Portland State University and teaches composition, fiction-writing, and zine-making at various institutions. This article has been viewed 874,800 times.
How helpful is this?
Co-authors: 12
Updated: August 9, 2023
Views: 874,800
Categories: Microsoft Excel
Article SummaryX

To unlock a sheet in an Excel workbook, right-click the sheet's tab and click Unprotect sheet. Enter the password, if prompted.

If you don't know the password, upload the sheet to your Google Drive, open it in Google Sheets, then re-download it to your computer.

Did this summary help you?

Thanks to all authors for creating a page that has been read 874,800 times.

Is this article up to date?

Advertisement