Protect a Workbook in Excel – 6 Methods

This is an overview.

1- overview image of protect workbook in Excel


Download Practice Workbook

Download the practice workbook here:

Here’s the password- 12345.


Method 1 – Protect the Excel Workbook Using the Mark as Final Option

  • Open the Excel file.
  • Go to File>> Info>> Protect Workbook>> Mark as Final.

2- selecting mark as final option from protect workbook section

  • In the dialog box, click OK.

3- clicking ok after selecting mark as final option to protect an Excel workbook

  • Excel will automatically mark the Excel workbook as a final version.
  • A warning box will be displayed if someone tries to open the workbook.
  • Click OK .

4- clicking ok in the warning box to proceed further

  • To continue editing, click Edit Anyway.

Excel will allow you to edit the workbook.

5- clicking edit anyway to continue editing the worksheet

 


Method 2 – Protect the Excel Workbook with a Password

  • Go to File>> Info>> Protect Workbook>> Encrypt with Password.

6- selecting Encrypt with Password option from protect workbook section

  • Enter a password in the Encrypt Document dialog box and click OK.

7- entering password in the Encrypt Document dialog box

  • Re-enter the password in the Confirm Password dialog box and click OK.

8- re-entering password in the Confirm Password dialog box

  • If you try to open your workbook, a password prompt is automatically displayed.
  • Enter the password: 12345 and click OK.

9- entering password to open password protected workbook in Excel

 


Method 3 – Use the ‘Open as Read-Only’ Feature to Protect Workbook

  • Go to File>> Info>> Protect Workbook>> Always Open Read-Only.

10- selecting Always Open Read-Only option from protect workbook section

  • The Excel workbook is in Read-Only mode. If someone tries to open the file, the following dialog box will be displayed.
  • Click Yes to proceed with the Read-Only mode. Selecting No will enable editing the workbook.

11- selecting yes no from read only dialog box to protect workbook in Excel

 


Method 4 – Use the General Options to Protect the Excel File with a Password

  • Click the File tab.

12- selecting file tab to use general options to protect Excel file with password

  • Go to Save As>> Browse.

13- choosing browse option to use general options to protect Excel file with password

  • In Save As, click Tools.
  • Select General Options.

14- selecting general options under tools section

  • Set a password to open the file.
  • Set another password to modify the file. Here, 12345 in both fields.
  • Click OK.

15- entering passwords in the general options dialog box

  • Re-enter the password and click OK.

16- re-entering password to proceed

  • Re-enter the password to modify the file and click OK.

17- re-type the password to modify the file

  • If you close the workbook, the password will be asked to open it.
  • Enter the password to open the file.

18- giving password to open the Excel file

  • Enter the password to modify the file.
  • Click OK.

Read More: [Fixed!]: Protect Workbook in Excel Not Working


Method 5 – Protect the Structure of an Excel Workbook

  • Go to File>> Info>> Protect Workbook>> Protect Workbook Structure.

19- selecting Protect Workbook Structure option from protect workbook section

  • Enter the password in Protect Structure and Windows dialog box and click OK.

20- entering password in Protect Structure and Windows dialog box

  • Re-enter the password.

21- confirming password to protect structure of an Excel workbook

  • Double-click the name of the sheet you want to rename, and Excel will prompt you with the message below.

22- verifying after protecting structure of an Excel workbook

You can open the Excel file, but cannot add a sheet, change the name, or delete any existing sheets.


Method 6 – Using a VBA Code to Protect the Excel Workbook with a Password

  • Press ALT + F11 to open Visual Basic.
  • Click Insert and select Module.
  • Enter the following code in the code editor and press F5 to run it.

23- VBA code to protect Excel workbook with password

If you open the file again after running the VBA code, you will need to enter the password.

24- entering password to access data after protecting Excel workbook with VBA

 

Read More: Difference Between Protect Sheet and Protect Workbook in MS Excel


How to Protect Specific Cells in an Excel Workbook

  • Select the cell range you want to protect.
  • Here, column B in the SalesRecordOf2021 worksheet.
  • Right-click and select Format Cells.

25- selecting format cells to protect specific cells in the Excel workbook

  • Go to Protection>> check Locked>> click OK.

26- selecting locked option under protection tab

  • Go to the Review tab>> click Protect Sheet.
  • Enter the password and enable “Protect worksheet and contents of locked cells”.
  • Click OK.

27- entering password and enabling Protect worksheet and contents of locked cells

  • Re-enter the password and click OK.

28- confirming password to protect specific cells in an Excel workbook

  • If you want to make any changes in column B, Excel will show you a warning message:

29- showed warning message in case of trying to edit anything in column B

 

 


Frequently Asked Questions

1. What are the 3 types of protection in Excel?

Answer: A workbook can be protected at the file or worksheet level in Excel. Excel provides three levels of password protection: password protection for opening files, password protection for changing data, and password protection for adding, deleting, or hiding worksheets.


Protect Workbook in Excel: Knowledge Hub


<< Go Back to Excel Protect | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Nujat Tasnim
Nujat Tasnim

Nujat Tasnim, BSc in Computer Science and Engineering from American International University-Bangladesh, has a year-long tenure with ExcelDemy. Initially a Content Developer at SOFTEKO, she transitioned to the Software Team as Junior Software Quality Assurance Engineer. Currently serving as a Junior SQA Engineer at SOFTEKO, she excels in SDLC, STLC, and requirement analysis and possesses profound insights into OOP-related software development processes. Nujat is also proficient in design software like Photoshop and Illustrator, contributing diverse skills to her... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo