Sheet protection in Excel prevents other users from editing cells, rows, columns, or other worksheet elements. When a sheet is protected, you โ or anyone else who opens the file โ can't make changes unless they enter the correct password or the protection is removed. Unprotecting is the process of removing that restriction, either by entering the password you set or by using workarounds when the password is unavailable.
There are two types of protection in Excel that are often confused: sheet protection and workbook protection. Sheet protection locks specific elements of a worksheet (cells, formatting, charts, pivot tables). Workbook protection restricts adding, deleting, moving, or renaming worksheets. Both use passwords, but they're set and removed separately. Knowing which type of protection you're dealing with determines which unprotect method to use.
This guide covers unprotecting Excel sheets with a known password, what to do if you've forgotten the password, the difference between sheet and workbook protection, and how to handle protect/unprotect for multiple sheets at once. We also cover protection in Excel Online and Excel for Mac. If you're looking to set up protection rather than remove it, this guide's settings overview applies in reverse. See our Excel sheet guide for a broader reference on worksheet management including tab organization and naming.
Understanding why someone might protect a sheet in the first place helps when you need to unprotect it. Common use cases include shared templates where the structure should stay fixed while data is entered in specific cells, financial models where formulas must not be accidentally overwritten, and reports prepared for distribution where the recipient should see but not alter the data. Knowing the intent helps you decide whether to remove protection permanently or just temporarily, make your edits, and re-apply.
The most important thing to know: if someone else protected the file and you don't have that password, your options are limited. The VBA method works for sheet protection specifically, but won't open an encrypted file. Always try the direct approach first โ enter the password you think was used, considering capitalization variants.
Sheet protection also affects how macros interact with a worksheet. VBA code that attempts to modify locked cells while a sheet is protected will throw a runtime error unless the macro explicitly unprotects the sheet before making changes and re-protects it afterward. If inherited macros are failing on protected sheets, add Unprotect and Protect calls around the cell modification code to handle this gracefully.
Check whether you're dealing with sheet protection (can't edit cells) or workbook protection (can't add/delete/move sheets). Sheet protection shows 'Unprotect Sheet' in the Review tab; workbook protection shows 'Protect Workbook' highlighted.
Go to the Review tab in the Excel Ribbon. Look for 'Unprotect Sheet' (if the sheet is currently protected) in the Protect section. If the sheet is not protected, you'll see 'Protect Sheet' instead.
Click 'Unprotect Sheet.' If the sheet has a password, a dialog appears asking for it. Enter the correct password and click OK. If there's no password, clicking 'Unprotect Sheet' removes protection immediately.
Try editing a cell that was previously locked. If you can type, the protection is removed. You can also confirm by checking that 'Protect Sheet' (not 'Unprotect Sheet') now appears in the Review tab.
Save the file after unprotecting. If you save as .xlsx, the unprotected state is preserved for future sessions. If you close without saving, the protection may remain on the next open (depends on the original file state).
If you set the password yourself and remember it, unprotecting is straightforward. Go to the Review tab โ click 'Unprotect Sheet' โ enter the password โ click OK. The protection is removed immediately, and all cells that were locked become editable. If you right-click the sheet tab instead, the 'Unprotect Sheet' option appears in the context menu โ either approach takes you to the same password dialog.
Passwords in Excel are case-sensitive. If your password isn't working, check whether Caps Lock is on and try different capitalization. Excel doesn't give you hints about why the password failed โ it simply returns an 'Incorrect Password' message. If you're certain the password is correct but it keeps failing, the file may have been protected by someone else who used a different password than the one you think was set.
No-password sheet protection is common in internal files where protection is used to prevent accidental edits rather than for security. If someone protected the sheet without setting a password, clicking 'Unprotect Sheet' removes the protection instantly โ no dialog appears. This is worth trying first before assuming you need a password workaround. Similarly, our how to freeze a row in Excel guide covers another sheet setting that's sometimes confused with protection โ frozen panes restrict scrolling but don't prevent editing.
After unprotecting a sheet, consider whether to re-protect it after making your changes. If the sheet was protected to prevent formula overwriting in a shared workbook, removing the protection permanently and forgetting to re-apply it can cause problems. A good habit: note that you removed protection, make your changes, and immediately re-apply via Review โ Protect Sheet. You can use the same password or set a new one if you're now responsible for the file's protection going forward.
File sharing and co-authoring in Microsoft 365 introduces additional considerations for protection. When multiple users are co-authoring a shared workbook in real time, sheet protection still applies to all collaborators. If you need to temporarily unprotect a sheet to make structural changes, communicate with other active users first โ their in-progress edits may be affected if the protection status changes while they are actively editing cells.
Locks cells, ranges, formatting, or other worksheet elements. Set via Review โ Protect Sheet. Password optional. Removed via Review โ Unprotect Sheet.
Prevents adding, deleting, moving, hiding, or renaming worksheets. Set via Review โ Protect Workbook. Separate from sheet protection โ both can be active simultaneously.
Individual cells can be marked as 'Locked' or 'Unlocked' via Format Cells โ Protection tab. Only takes effect when sheet protection is active. By default, all cells are marked Locked.
Specific ranges can have their own passwords (Review โ Allow Users to Edit Ranges). Different users can edit different ranges with different passwords while the sheet remains protected.
Separate from sheet/workbook protection โ this encrypts the entire file (File โ Info โ Protect Workbook โ Encrypt with Password). Requires the password just to open the file.
Not true protection โ the file can be saved as a copy. Set via File โ Save As โ Tools โ General Options โ Read-Only Recommended. Different from password-protected protection.
If you've forgotten the password for a sheet you own, a VBA macro can remove the protection. This method works because VBA bypasses the password check by trying all possible combinations algorithmically. It's legal to use on your own files โ it's not appropriate for accessing other people's protected data.
Open the Visual Basic Editor with Alt+F11. Go to Insert โ Module. Paste and run this macro:
Sub RemoveSheetProtection()
Dim i As Integer, j As Integer, k As Integer
Dim l As Integer, m As Integer, n As Integer
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 n = 32 To 126
ActiveSheet.Unprotect Chr(i) & Chr(j) & Chr(k) & _
Chr(l) & Chr(m) & Chr(n)
If ActiveSheet.ProtectContents = False Then Exit Sub
Next: Next: Next: Next: Next: Next
End SubThis generates a password that Excel accepts as equivalent (though not the original). The sheet becomes unprotected.
To unprotect all sheets in a workbook at once (when they all share the same password), use VBA:
Sub UnprotectAllSheets()
Dim ws As Worksheet
Dim pwd As String
pwd = InputBox("Enter the protection password:")
For Each ws In ThisWorkbook.Worksheets
ws.Unprotect Password:=pwd
Next ws
MsgBox "All sheets unprotected."
End SubRun this from Developer โ Macros โ Run. When prompted, enter the password. If sheets have different passwords, you'll need to handle them individually or modify the script to try multiple passwords.
In Excel Online (the browser-based version), sheet protection works similarly to the desktop app. Go to Review โ Unprotect Sheet โ enter the password. The limitation is that the VBA workaround for forgotten passwords doesn't work in Excel Online โ VBA isn't available in the browser version.
If you need to unprotect a sheet without the password and you're in Excel Online, download the file (.xlsx), open it in desktop Excel, use the VBA method, save the file, and re-upload. The desktop Excel VBA workaround resolves the forgotten password even for files that originated in Excel Online.
Workbook protection and sheet protection are separate settings that are often applied together but serve different purposes. Workbook structure protection (Review โ Protect Workbook) prevents changes to the workbook structure: adding new sheets, deleting sheets, moving or copying sheets, hiding or unhiding sheets, and renaming sheet tabs. It doesn't affect whether cells within a sheet are editable โ that's controlled by sheet protection.
To remove workbook protection, go to Review โ Protect Workbook (which toggles off) โ enter the password if one was set. Notice that the Protect Workbook button has a different appearance when protection is active โ it looks 'pressed in' or highlighted. Clicking it again toggles the protection off. If you're unsure whether workbook protection is on, try right-clicking a sheet tab โ if you can't add, delete, or rename sheets, workbook protection is active.
A common scenario: a workbook is protected at both levels. You can edit cells in existing sheets (no sheet protection), but you can't add new sheets (workbook structure protection is on). Or the reverse: you can add sheets freely but you can't edit cells in the main data sheet (sheet protection is on). Understanding which level you're dealing with saves you from looking in the wrong place. The Excel formulas guide covers how protected sheets interact with formula calculations โ some functions behave differently in protected sheets.
When both sheet protection and workbook structure protection are active simultaneously, you need to remove both independently for full editing freedom. Start with sheet protection to unlock cells, then remove workbook protection. The order doesn't matter, but both must be removed for complete access. Some Excel users apply workbook structure protection without sheet protection โ cells are editable, but the sheet layout (tabs, order) cannot be changed. Checking both is worth doing when you encounter unexpected restrictions.
Administrators in larger organizations sometimes push Excel templates with protection already applied via group policy or IT-managed processes. In these cases, the protection password may be managed at the IT level rather than by individual users. If you cannot unprotect a sheet and you know you should have access, contact your IT department rather than attempting workarounds โ the file may be intentionally locked as part of a compliance requirement.
Understanding cell locking is key to setting up useful sheet protection. By default, every cell in Excel is marked as 'Locked' in the Format Cells dialog, but locking only takes effect when sheet protection is active. This means that before protecting a sheet, you should first unlock the cells you want users to be able to edit, and then turn on sheet protection.
To unlock specific cells: select them โ right-click โ Format Cells โ Protection tab โ uncheck 'Locked' โ OK. Then go to Review โ Protect Sheet. Now all cells that have 'Locked' checked (the majority) will be protected, and the cells you unlocked remain editable. Users can click and edit only the unlocked cells โ attempting to edit a locked cell shows a warning message.
When you unprotect the sheet later (Review โ Unprotect Sheet), all cells become editable again regardless of their locked/unlocked status. The locked/unlocked setting is preserved in the cell formatting โ it'll be there next time you protect the sheet. This design means you can toggle sheet protection on and off without having to re-configure which cells are locked each time. Use our Excel shortcuts cheat sheet to speed up repetitive formatting operations when setting up cell-level protection across large sheets.
A common mistake when setting up selective cell protection: forgetting to unlock input cells before turning on sheet protection. If you protect the sheet without first unlocking the cells where users need to enter data, all cells will be locked and users cannot enter anything. The sequence matters: (1) select input cells, (2) unlock them via Format Cells โ Protection โ uncheck Locked, (3) then apply sheet protection. If done out of order, unprotect the sheet, unlock the cells, and re-protect. Use Ctrl+1 as a fast shortcut to open Format Cells.
For Excel power users who frequently toggle protection while working, creating a simple macro that unprotects and re-protects a sheet with a single keystroke can save significant time. Assign the macro to a keyboard shortcut via Developer โ Macros โ Options. This approach is especially useful in financial modeling workflows where you frequently need to update formulas in protected sheets without going through the Review tab menu each time.
Sheet protection works the same way on Mac as on Windows. On a Mac, go to the Review tab โ Protect Sheet or Unprotect Sheet. The password dialog behaves identically. The VBA approach for forgotten passwords also works on Mac โ open the Visual Basic Editor with Fn+Option+F11 (or Tools โ Macro โ Visual Basic Editor), paste the same macro code, and run it. Mac Excel's VBA environment is slightly more limited than Windows in some areas, but sheet protection removal via VBA works reliably.
One Mac-specific note: the keyboard shortcut for toggling Format Cells on Mac is Cmd+1, and the Protection tab within Format Cells is accessible the same way as on Windows. The Review tab location and the Protect Sheet/Unprotect Sheet buttons are identical in position in the Mac Excel Ribbon. Users who switch between Mac and Windows Excel rarely need to relearn protection workflows.
For files protected with file-level encryption (not just sheet protection), the Mac version of Excel handles this through the same Passwords section in the Save As dialog. If you need to remove the file-open password, open the file (you'll need the password), go to File โ Passwords, clear the password fields, and save. This is separate from removing sheet or workbook structure protection, which uses the Review tab. For managing complex Excel files and templates, consider reviewing the how to merge cells in Excel guide for another common formatting operation that interacts with cell protection settings.
Excel 2016 and earlier versions on Mac had some differences in how protection was managed compared to Windows, but modern versions (Excel 2019, Microsoft 365) are largely consistent between platforms. If you're working with older files protected in Excel 2011 or earlier, the protection mechanism may differ. For very old file formats (.xls rather than .xlsx), some protection behaviors differ. Converting to .xlsx first via File โ Save As โ Excel Workbook before attempting to remove protection often resolves compatibility issues with legacy protected files.
Excel for iPad and iPhone support basic sheet protection โ you can view and interact with protected sheets, but the unprotect workflow differs slightly. On iOS, protection settings are under the ellipsis menu in the top right corner. The full VBA-based unprotect method is not available on mobile versions of Excel. For files that require the VBA workaround, use the desktop application rather than attempting the fix on a mobile device.
If clicking 'Unprotect Sheet' and entering the correct password still doesn't work, the most likely issue is password case sensitivity. Excel distinguishes between uppercase and lowercase letters, so 'Password' and 'password' are different. Turn off Caps Lock, try the password again, and consider common variations: password with capital P, all lowercase, or with numbers you might have added.
Another scenario: the file owner used a different password than you think. If the file came from a colleague or template, they may have set a different password. Contact the original file creator for the password if possible โ this is always simpler than attempting workarounds. Some organizations also use IT-managed Excel templates with standardized passwords that your IT department can provide.
If the workbook is marked as Final (File โ Info โ Protect Workbook โ Mark as Final), it's in read-only mode โ but this isn't password protection. Simply click 'Edit Anyway' in the yellow bar that appears at the top of the sheet. Mark as Final is more of a courtesy flag than actual protection and doesn't require any password to override. For additional Excel skills development, our how to unhide columns in Excel guide covers another common worksheet issue that's sometimes mistaken for protection โ hidden columns appear missing but are just hidden, not locked.
One scenario that often confuses users: a spreadsheet that looks protected but shows no Unprotect Sheet option. This can happen when the file is opened in Protected View โ a read-only mode Excel uses for files from external sources. Look for the yellow bar at the top saying PROTECTED VIEW. Click Enable Editing to exit Protected View โ this is different from sheet protection and does not require a password. Once editing is enabled, check whether sheet protection is also present via the Review tab.
Conditional formatting and data validation are affected by sheet protection in specific ways. Conditional formatting rules still apply in a protected sheet โ the visual formatting updates as data changes. Data validation rules remain in effect for unlocked cells. However, users cannot modify the validation rules or conditional formatting definitions themselves when the sheet is protected. This means you can set up input restrictions for unlocked cells that remain enforced even in a protected sheet.