How to Password Protect an Excel File

Protect your workbooks and data

Image of a file secured with a lock

 youngvet/Getty Images

People often store a lot of sensitive data inside an Excel workbook. A good way to protect that information is to password protect an Excel file.

There are several ways to do this. You can either apply security so no one can open the file without a password, or you can set it up so no one can change anything in the file without a password (but can open it as read-only).

Instructions in this article apply to Excel 2019, 2016, 2013; Excel for Office 365, and Excel for Mac.

How to Set a Document Open Password in Excel

To configure your workbook so no one can open it without a password, you'll need to apply a document open password in the Info area of Excel.

  1. With the workbook open, select File > Info > Protect Password. Select the Protect Workbook drop-down menu, then select Encrypt with Password.

    Screenshot of selecting Encrypt with Password in Excel
  2. A pop-up window will ask you to enter a password. Enter a strong password.

    Screenshot of assigning a worksheet password

    Remember the password is case sensitive, so you can vary capital and lower case letter to make the password even more secure.

  3. A second window will request you re-enter the password. Make sure to enter the password exactly as you typed it in the first window.

    Screenshot of confirming the worksheet password

    Having to enter the password twice will ensure that if you mistyped it either time, you won't end up locking the sheet with the wrong password.

  4. Once you're done, you'll see the Protect Password option change color, with a status indicating that a password is required to open the workbook.

    Screenshot of a protected worksheet status
  5. Your workbook is now protected from anyone opening it if they don't know the password. When anyone tries to open the worksheet, they'll see a popup window asking for the password.

    Screenshot of the worksheet password prompt
  6. If they enter the password incorrectly, it'll let them attempt to enter it a second time. If they fail to enter the correct password again, the worksheet won't open. This is the best method to secure your Excel files.

To remove the workbook password protection, just repeat the process above, but clear the password field and select OK.

How to Add a Modify Password to Your Excel Workbook

Another approach to protecting an Excel worksheet is using a password to prevent people from making changes to it.

  1. With your worksheet open, select File > Save As. Then, select Browse to open the file browse window.

    Screenshot of saving an Excel worksheet
  2. In the Save As window, select the Tools drop-down and select General Options.

    Screenshot of selecting General Options in Excel
  3. In the General Options window, type a password into the Password to modify field.

    Screenshot of entering password to modify in Excel

    You can also enter a password into the Password to open field, which would require a password to open the workbook at all. This works just like the Info password protection described above.

  4. You'll be prompted to re-enter the password to make sure you didn't type it incorrectly.

    Screenshot of re-entering password to modify worksheet

    To remove modify password protection, just follow the same procedure as above, but clear the password field and select OK.

  5. When anyone opens this workbook, they'll be prompted to either enter the correct password to modify the workbook, or they can select Read Only to open the workbook in read only mode.

    Screenshot of opening a password protected Excel worksheet

Using read only worksheet protect is a smart way to share important information with people, but prevent them from changing or modifying a sheet that you worked hard to develop. This is useful for sending reports with complex calculations and formulas throughout.

How to Protect Password During Review

If you frequently review draft workbooks that people create, password protecting the workbook once it's in the review phase is a good way to prevent changes during or after a quality review.

This won't prevent content changes, but it will prevent people from adding, removing, renaming, or creating new sheets. It protects the structure of the workbook itself, rather than the contents.

  1. With the workbook open, select Review > Protect Workbook.

    Selecting Protect Workbook during review in Excel
  2. Type a password, then select OK. You'll be prompted to enter the password again.

    Screenshot of selecting a review password
  3. Once enabled, whenever anyone opens this workbook and right-clicks the sheet, all of the options to modify the sheet or add new sheets will be disabled.

    Screenshot of disabled shet options in Excel