This article explains how to unprotect Excel workbooks. The information applies to Excel workbooks in Microsoft Excel 365, Microsoft Excel 2019, 2016, and 2013.

What to Know

  • Unprotect as owner: Select Review > Unprotect Sheet and enter the password.Unprotect without password: Open Visual Basic code editor by selecting Developer > View code.Then, enter the code supplied in this article and select Run. In a few minutes, a password is revealed. Choose OK.

How to Unlock an Excel Workbook as the Owner

Microsoft Excel is packed with features. One such feature is the ability to protect your Excel files at the cell, spreadsheet, or workbook level. Sometimes it’s necessary to unprotect Excel workbooks to ensure data changes apply correctly.

This method assumes that as the owner of the file, you remember the password used to protect the spreadsheet.

  • Open the protected spreadsheet, and select Review > Unprotect Sheet. You could also right-click the protected spreadsheet, then select Unprotect Sheet.
  • You can identify a protected spreadsheet under the Changes section of the Review tab on the ribbon. If the spreadsheet is protected, you see the Unprotect Sheet option.
  • Enter the password used to protect the spreadsheet, then select OK.
  • Your spreadsheet will now be unprotected and it can be modified.

How to Unprotect an Excel Workbook Without Knowing the Password

You may have protected your Excel workbook or spreadsheet and haven’t had to modify it in some time, even years. Now that you need to make changes, you no longer remember the password you used to protect this spreadsheet.

Open the protected spreadsheet, and select Review > Unprotect Sheet. You could also right-click the protected spreadsheet, then select Unprotect Sheet.

You can identify a protected spreadsheet under the Changes section of the Review tab on the ribbon. If the spreadsheet is protected, you see the Unprotect Sheet option.

Enter the password used to protect the spreadsheet, then select OK.

Your spreadsheet will now be unprotected and it can be modified.

Fortunately, these steps will allow you to unprotect your workbook using a Virtual Basic script as a macro to identify the password.

  • Open the protected spreadsheet.
  • Access the Visual Basic code editor by either pressing ALT+F11 or select Developer > View Code.
  • In the Code window of the protected sheet, enter the following code:
  • Sub PasswordBreaker()Dim i As Integer, j As Integer, k As IntegerDim l As Integer, m As Integer, n As IntegerDim i1 As Integer, i2 As Integer, i3 As IntegerDim i4 As Integer, i5 As Integer, i6 As IntegerOn Error Resume NextFor i = 65 To 66: For j = 65 To 66: For k = 65 To 66For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126ActiveSheet.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 ThenMsgBox “One usable 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 SubEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextEnd Sub
  • Select Run or press F5 to execute the code.
  • The code will take several minutes to run. Once finished, you’ll receive a pop-up with a password. Select OK and your spreadsheet will be unprotected.
  • This is not the original password and you don’t need to remember it.

Open the protected spreadsheet.

Access the Visual Basic code editor by either pressing ALT+F11 or select Developer > View Code.

In the Code window of the protected sheet, enter the following code:

Sub PasswordBreaker()Dim i As Integer, j As Integer, k As IntegerDim l As Integer, m As Integer, n As IntegerDim i1 As Integer, i2 As Integer, i3 As IntegerDim i4 As Integer, i5 As Integer, i6 As IntegerOn Error Resume NextFor i = 65 To 66: For j = 65 To 66: For k = 65 To 66For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126ActiveSheet.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 ThenMsgBox “One usable 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 SubEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextEnd Sub

Select Run or press F5 to execute the code.

The code will take several minutes to run. Once finished, you’ll receive a pop-up with a password. Select OK and your spreadsheet will be unprotected.

This is not the original password and you don’t need to remember it.

  • How do I protect workbooks in Excel?
  • To password-protect Excel workbooks, open the workbook and select File > Info > Protect Password > Protect Workbook > Encrypt with Password.
  • How do I protect cells in Excel?
  • To lock cells in Excel to protect data, highlight the cells, go to the Home tab, and select Format > Lock Cell.

To password-protect Excel workbooks, open the workbook and select File > Info > Protect Password > Protect Workbook > Encrypt with Password.

To lock cells in Excel to protect data, highlight the cells, go to the Home tab, and select Format > Lock Cell.

Get the Latest Tech News Delivered Every Day