Don’t forget to share this post

Nowadays, the concept of data protection is on the rise and has become a concern to most online users. If using an Excel workbook or file is part of your daily routine, then you will most likely be interested in learning how to protect your entire file instead of a single sheet. Depending on the level of sensitivity and confidentiality of the data you work with, you could save much more than only your time and effort.

This article will show you how to password-protect an Excel file, which is essentially adding extra security to the whole file so that only authorized users can open it or make changes to its content. The procedure shown below is also referred to as file encryption. Since the users working on the file can change the nature of the contents, you also need to know how to remove a password from Excel.

In a few simple steps, you can save yourself from future unexpected and unpleasant situations.

How to password-protect vs encrypt an Excel file?

Although there is a difference between password protection and encryption, when it comes to securing your data at a file level, it is the same thing. The term “encryption” essentially refers to an algorithmic procedure whereby the content is concealed or hidden. Given that the content will only be accessible or readable to those who can open the password-protected file, the contents remain concealed from the rest. For now, we will explain how to protect your Excel file by adding a password:

How to add a password to open an Excel file

The following steps apply to the latest version of Excel for Mac (2019, 16.29) and Excel for Windows (2016 and later version). If you are working with older versions of Excel, we recommend visiting Microsoft support.

  1. 1. Open the Excel file you want to password protect and go to the “File” tab.
How to add a password to open Select File
  1. 2. From the drop-down menu, select “Save As”.
How to add a password to open Select Save As
  1. 3. Click on the “Options…” button below the “File Format” option.
How to add a password to open Select Options button
  1. 4. It will then ask you to provide a password to “Open” and “Modify.” For now, enter the “Password to open”.
How to add a password to open Set up Password

IMPORTANT: Make sure you don’t forget the password. Save it in a secure file, for example, your usual password manager or another encrypted Excel file.

  1. 5. Enter the password you chose and then click “OK”.
How to add a password to open Enter Password
  1. 6. It will prompt you to re-enter the password for confirmation. Note how the system also gives you a warning message regarding password safety measures. If lost, it is not possible to recover.
How to add a password to open Re enter password
  1. 7. Click on “Replace” since you have changed the opening method for an existing file.
How to add a password to open Replace file
  1. 8. If you want to check whether the password-protection was successful, right-click on the Excel file to select “Open,” or simply double-click on the file.
How to add a password to open Open password protected file
  1. 9. As you can see, it prompts you to enter the password. Make sure it’s correct, as it is case-sensitive.
How to add a password to open Enter password 2
  1. 10. Click “OK”.
How to add a password to open Click OK

Your file can now only be opened by users you have shared your password with. Moreover, if you wish to apply further restrictions, you can also protect your file from modifications.

How to Remove a Password from Excel? (Multiple Methods)

Passwords prevent your Excel file from unauthorized access. But what if you want to remove it? Here's how to remove a password from an Excel workbook

How to Remove a Password From Excel Multiple Methods

How to add a password to modify an Excel file?

Instead of protecting the contents of the Excel file for security or sensitive reasons, you may simply want to avoid modifications or copy/paste actions. This is what you need to do to password-protect from modifications:

  1. 1. Repeat steps 1 to 4 from the previous section.
  2. 2. Once here, you can leave the “password to open” field and tick the “Read-only” box. This allows users to open the file but restricts them from modifying the data.
How to add a password to modify Open as Read only
  1. 3. You can also include a different password to allow specific users to make changes. Note that this would require remembering two different passwords and may lead to possible confusion.
How to add a password to modify Password to modify
  1. 4. As before, you can now proceed to “Save”.
How to add a password to modify Save
  1. 5. And “Replace” to save all changes made to the file.
How to add a password to modify Replace
  1. 6. To check that changes are made correctly, “Open” the file and enter the password you created previously to open.
How to add a password to modify Password to open
  1. 7. Now, you will see how the file also distinguishes between users that can open with (via password) and without editing rights (Read-only).
How to add a password to modify Click OK
How to lock cells in Excel
How to Lock Cells in Excel? (Cells, Sheets & Formulas)

Cells in Excel spreadsheets can be locked to prevent accidental edits. Here's how to lock specific cells, worksheets and formulas in Excel



This article has shown you how to password-protect an Excel file to restrict users from opening and/or modifying the Excel file. Remember that password-protecting an Excel file will encrypt the contents, as only users who have the password can access the document. If you decide to share the password to open, it may be advisable to set another security layer by adding a password for modification or edit.

If you are working online, our article on How to password-protect a Google Sheet will be useful as the procedure is different. Microsoft Office 365 plans include Microsoft OneDrive, an online workspace that allows storing and sharing files and offers a Personal Vault feature for password management as a security measure.

Whichever your working scenario, don’t forget to keep all passwords safe in another Excel file or specific password manager; update and change your passwords as frequently as needed, and always have a clear map of users that will require access to the file for editing purposes.

Hady ElHady
Hady is Content Lead at Layer.

Hady has a passion for tech, marketing, and spreadsheets. Besides his Computer Science degree, he has vast experience in developing, launching, and scaling content marketing processes at SaaS startups.

Originally published Jan 21 2022, Updated Jun 18 2023

Layer is now Sheetgo

Automate your procesess on top of spreadsheets