6 Ways to Lock an Excel Spreadsheet From Editing

Wondering how to lock an Excel spreadsheet from editing? Follow along with the methods mentioned here to develop and practice this essential Microsoft Excel skill.

Imagine running a business where you manage critical financial data in Excel. You wouldn’t leave important contracts on a desk where anyone could alter them, right? The same logic applies to your Excel spreadsheets. Locking an Excel file from editing is an essential skill. It can feel overwhelming if you don’t know where to start. But don’t worry—I’ll walk you through different methods. By the end of this tutorial, you’ll know exactly how to protect your data.

Using Protect Sheet

The Protect Sheet feature in Excel helps you lock a worksheet so others can’t make unwanted changes. However, the feature still allows certain actions, like selecting cells or formatting. It’s useful when you’re sharing a file, protecting formulas, or preventing accidental edits in important data.

Excel uses password encryption to enforce this protection, making it reliable, though not completely hack-proof against advanced users. The best part? It’s easy to use, works smoothly across different Excel versions, and ensures that even older files with protection settings remain functional.

Protect Sheet
Protect Sheet

If you wish to try it out, open your Excel file and navigate to the Review tab located in the ribbon at the top of the window.

Click on Protect Sheet, which will open a dialog box where you can set protection settings.

Protect Sheet configurations
Protect Sheet configurations

In the Password to unprotect sheet field, type a strong password to prevent unauthorized editing of the sheet.

Below the password field, you will see several checkboxes under Allow all users of this worksheet to. Select the actions you want to allow, such as selecting or formatting cells.

Confirm Password
Confirm Password

Click OK, and a confirmation box will appear asking you to re-enter your password. Type the password again and click OK to apply the protection.

Save spreadsheet
Save spreadsheet

Save your workbook to ensure that the protection settings remain active the next time you open the file.

You can share the password to unlock this security feature only with trusted colleagues and external collaborators.

Unprotect Sheet
Unprotect Sheet

To remove protection, go to the Review tab, click Unprotect Sheet, enter the password, and press OK to regain full editing access.

Please note that once you unlock the sheet protection feature by entering the password, it becomes permanent. You must again engage the sheet protection before saving and closing the edited worksheet.

Locked sheet pop up
Locked sheet pop-up

If all other users try to make any changes in the spreadsheet, a pop-up will show up explaining that the cell or cell ranges are protected.

Password Protect the File

Sometimes, you might want to lock down your Excel sheet completely by encrypting the entire workbook with a password. This ensures that no one can open or edit any worksheet in the file without the password.

Unlike standard sheet protection, this method isn’t readily available in the Excel ribbon menu. Instead, you need to apply password encryption when creating and saving the file.

Since this process isn’t widely known, let me guide you through it step by step.

Save As
Save As

Open the Excel file in which you want to lock one or more sheets. Click on the File menu in the Excel ribbon and choose Save As from the left-side navigation panel.

On the right side, scroll down to the Share options section and click on the Browse or This PC option.

General Options
General Options

In the Save As dialog box, click Tools (next to the Save button) and select General Options from the dropdown list.

Configuring General Options
Configuring General Options

In the General Options window, type a strong password in the Password to modify field to prevent unauthorized editing.

Enter a password in the Password to open field if you want to restrict access to only authorized users.

Checkmark the checkbox for the Read-only recommended option.

Confirm Password
Confirm Password

Click OK, then re-enter the password(s) in the confirmation prompts to ensure accuracy.

Click Save to apply the protection, then close and reopen the file to verify that the password prompt appears.

Lock Specific Cells

Do you need to protect specific sets of cell ranges in an Excel worksheet? You can use this method to selectively lock some cells.

Uncheck Locked cells
Uncheck Locked cells

Open your Excel file, and select the entire sheet by pressing Ctrl + A or clicking the box at the top-left corner of the grid.

Right-click anywhere in the selection, choose Format Cells, then go to the Protection tab. Alternatively, you can press Ctrl + 1 to bring up the Format Cells dialog box.

Uncheck Locked and click OK to remove protection from all cells so you can lock only specific ones.

Format Cells
Format Cells

Select the cells you want to lock, right-click, choose Format Cells, and go back to the Protection tab.

Check Locked and click OK to mark these specific cells as protected.

Specific cells Protect Sheet
Specific cells Protect Sheet

Go to the Review tab, click Protect Sheet, and set a password to enable protection.

Protect Sheet specific cells
Protect Sheet specific cells

Choose the actions you want to allow users to perform, then click OK.

Re-enter password
Re-enter password

You’ll need to re-enter the password for authentication in the Confirm Password dialog box.

Pop up for protected sheets
Pop-up for protected sheets

Save your workbook and test by trying to edit a locked cell—Excel should prevent changes. A pop-up will show up showing the restrictions enforced in the active worksheet.

Editing a cell in same protected sheet
Editing a cell in the same protected sheet

Contrarily, you can easily edit other cells in the worksheet that aren’t locked.

Share as a Protected View File

The Share as a Protected View File feature in Excel helps restrict editing by opening files in a secure, read-only mode when shared via email or the internet. Technically, Excel enables Protected View for files downloaded from online sources or received as attachments, blocking automatic editing to prevent potential security threats like malware.

This method doesn’t require a password but relies on Excel’s security protocols, ensuring recipients must manually click Enable Editing to make changes, reducing the risk of unauthorized modifications.

Save As dialog for protected view
Save As dialog for protected view

Open your Excel file, click File, then select Save As to choose a location for saving.

Tools General Options
Tools General Options

In the Save As dialog box, select Excel Workbook (*.xlsx) to keep formatting intact.

Click Tools (next to the Save button), then choose General Options from the dropdown list.

Read-only recommended
Read-only recommended

Check Read-only recommended to suggest opening the file in a non-editable mode, then click OK.

Save workbook protected mode
Save workbook-protected mode

Click Save, then share the file via email or a cloud service like OneDrive or SharePoint.

If opening from email or the internet, Excel will display a Protected View warning, restricting editing for security.

To keep it locked, advise recipients not to click Enable Editing, ensuring the file remains in Protected View.

Using the Mark Workbook as Final Command

The Mark Workbook as Final feature in Excel makes a file read-only by adding a notification that discourages further editing. Technically, it doesn’t enforce security with passwords but applies metadata that signals the document is complete, prompting users with a Marked as Final warning. While this method helps prevent accidental changes, it isn’t a strict lock—anyone can click Edit Anyway to modify the file. Now, let me show you how to use this feature below:

Mark as Final
Mark as Final

Open your Excel file, click File, then select Info to access workbook settings.

Click Protect Workbook, then choose Mark as Final to set the file as a final version.

A confirmation message will appear explaining that the file will be marked as final and made read-only.

Click OK to proceed.

Another prompt will appear confirming the change; click OK again to apply the final status.

Edit Anyway
Edit Anyway

Excel will display a Marked as Final message at the top, indicating that editing is disabled to prevent further changes.

Save and share the workbook. When your colleagues or collaborators open the workbook, it’ll show a read-only notification, discouraging them from making edits.

To remove the restriction, click the Edit Anyway button in the warning message, allowing modifications to the file.

Using the Restrict Access Feature

The Restrict Access feature in Excel lets you control who can view or edit your workbook or specific sheets. It uses Microsoft 365’s Information Rights Management (IRM) to apply access restrictions. This feature offers stronger protection than password settings. It allows you to give different permissions to users, such as read-only access or preventing printing.

Here’s how you can use Restrict Access in Excel for the Microsoft 365 desktop app:

Restrict Access
Restrict Access

Access your Excel workbook, click File, then choose Info to access document settings.

Click Protect Workbook, then choose Restrict Access to open the permission settings.

In the Restrict Access menu, click Grant Access to select who can view or edit the file.

User or group
User or group

Choose a user or group from your list or type in their email address to specify who gets access.

Under Permission, select the level of access, such as Read or Read/Write.

Click OK to apply the restrictions, then save the workbook to lock the access settings in place.

To check the permissions, go back to the Restrict Access menu, and it’ll show the list of users with access and their permission levels.

Conclusions

These are the proven ways to lock an Excel spreadsheet from editing for confidentiality and policy requirements.

If you’ve found this Microsoft Excel tutorial insightful and useful, you can share your acknowledgment below by writing a comment. Also, you can suggest any better method to lock a worksheet in Excel if you know any.

About the Author

Tamal Das

Tamal Das

I'm a freelance writer at HowToExcel.org. After completing my MS in Science, I joined reputed IT consultancy companies to acquire hands-on knowledge of data analysis and data visualization techniques as a business analyst. Now, I'm a professional freelance content writer for everything Excel and its advanced support tools, like Power Pivot, Power Query, Office Scripts, and Excel VBA. I published many tutorials and how-to articles on Excel for sites like MakeUseOf, AddictiveTips, OnSheets, Technipages, and AppleToolBox. In weekends, I perform in-depth web search to learn the latest tricks and tips of Excel so I can write on these in the weekdays!

Related Posts

Comments

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get the Latest Microsoft Excel Tips

Follow Us

Follow us to stay up to date with the latest in Microsoft Excel!

Subscribe for awesome Microsoft Excel videos 😃