Excel Practice Test

Knowing how to protect a sheet in Excel is one of the most practical skills you can develop for managing spreadsheets in a professional environment. Whether you are sharing a budget tracker with colleagues, distributing a data entry form to a team, or publishing a read-only report for stakeholders, worksheet protection prevents accidental edits, formula deletions, and unauthorized changes that can corrupt your data. Excel's built-in protection tools give you fine-grained control over exactly what users can and cannot do inside a workbook.

Knowing how to protect a sheet in Excel is one of the most practical skills you can develop for managing spreadsheets in a professional environment. Whether you are sharing a budget tracker with colleagues, distributing a data entry form to a team, or publishing a read-only report for stakeholders, worksheet protection prevents accidental edits, formula deletions, and unauthorized changes that can corrupt your data. Excel's built-in protection tools give you fine-grained control over exactly what users can and cannot do inside a workbook.

Excel sheet protection is not the same as file-level encryption, but it is a powerful first line of defense for everyday collaboration. When you protect a worksheet, Excel locks the entire sheet by default and prevents users from inserting rows, deleting columns, formatting cells, or editing any content that you have not explicitly unlocked. You can combine sheet protection with cell-level locking to create sophisticated forms where some areas are editable and others are completely off-limits — a technique used widely in finance, HR, and operations teams.

Many users confuse worksheet protection with workbook structure protection, which are two separate features. Worksheet protection controls what can be done inside a single tab — editing cells, sorting data, using filters. Workbook protection, by contrast, prevents users from adding, deleting, hiding, or renaming sheets. Understanding the difference helps you apply the right layer of security for each situation. For most day-to-day use cases, worksheet protection is what you need first.

One frequently overlooked aspect of Excel protection is the relationship between locked cells and the Protect Sheet command. By default, every cell in a new worksheet has the Locked property enabled. However, this locked property has no effect until you actually turn on sheet protection. That means if you want to allow users to edit certain input fields while keeping formulas and headers locked, you must first unlock those specific cells and then activate protection — not the other way around.

Excel protection features are available across all major versions of the software, including Excel 2016, 2019, 2021, and Microsoft 365. The steps are nearly identical across versions, with minor differences in the ribbon layout. If you are working in the browser-based Excel for the web, some advanced protection options such as specifying which users can edit specific ranges may be limited compared to the desktop application. Always verify your protection settings in the final environment where the file will be used.

Beyond basic password protection, Excel also lets you specify granular permissions when protecting a sheet. You can allow users to select locked cells, select unlocked cells, format cells, format columns, format rows, insert rows, insert columns, insert hyperlinks, delete rows, delete columns, sort, use AutoFilter, use PivotTable reports, edit objects, and edit scenarios. Choosing the right combination of these permissions is key to building worksheets that are both protected and functional. This guide walks you through every option so you can tailor protection to your exact workflow.

If you regularly work with sensitive Excel files and also need to share them externally, you may want to combine sheet protection with PDF export. Learning how to protect a sheet in excel and then exporting to PDF is a common workflow for finance and legal teams who need to distribute read-only snapshots of protected workbooks. This guide covers both the protection setup and practical tips for maintaining data integrity across different sharing scenarios.

Excel Sheet Protection by the Numbers

🛡️
15+
Permission Options
📊
1B+
Excel Users Worldwide
⏱️
< 60s
Time to Protect a Sheet
🔑
255
Max Password Length
💻
100%
Version Coverage
Test Your Knowledge: How to Protect a Sheet in Excel

How to Protect a Sheet in Excel: Step-by-Step

🖱️

Highlight any cells users should still be able to edit — such as input fields or data entry ranges. Right-click, choose Format Cells, go to the Protection tab, and uncheck the Locked box. This marks those cells as unlocked so they remain editable after protection is turned on.

🔒

Navigate to the Review tab on the Excel ribbon and click Protect Sheet. Alternatively, right-click the sheet tab at the bottom of the screen and select Protect Sheet from the context menu. Either method opens the same Protect Sheet dialog box with all available permission options.

🔑

In the Protect Sheet dialog, enter a password in the Password to unprotect sheet field if you want to prevent others from removing the protection. Leave it blank if you only want to prevent accidental edits without restricting who can disable protection. Record your password somewhere safe — Excel cannot recover a lost sheet password.

📋

In the Allow all users of this worksheet to section, check each action you want to permit. Common choices include Select unlocked cells, Sort, and Use AutoFilter. By default, only Select locked cells and Select unlocked cells are checked. Adjust based on how users need to interact with the sheet.

Click OK to apply protection. If you entered a password, Excel will prompt you to re-enter it to confirm. After confirmation, the worksheet is immediately protected. Try clicking a locked cell — Excel will display a message explaining that the cell is protected and suggesting how to turn off protection.

🧪

Test the protection by attempting to edit a locked cell, delete a row, and type in an unlocked cell. Confirm that locked areas are blocked and unlocked areas accept input. If something is wrong, go to Review and click Unprotect Sheet to adjust settings. Re-apply protection once everything works as intended.

Understanding how cell locking interacts with sheet protection is the key to building truly flexible protected worksheets. As mentioned earlier, every cell starts with the Locked property set to true, but this setting is dormant until you activate sheet protection. The practical implication is that your workflow should always begin by unlocking the cells users need to edit before you turn on protection — not after. Reversing this order is the most common mistake beginners make when learning to protect sheets in Excel.

To unlock specific cells, select the range you want users to edit freely. This could be a column of input cells in a budget form, a single data entry field, or an entire row reserved for user responses. Right-click the selection and choose Format Cells, then click the Protection tab. Uncheck the Locked checkbox and click OK. You will not see any visual change on the sheet at this point because protection is not yet active — the change is stored as a cell property that will take effect once you protect the sheet.

You can also unlock cells from the Home tab on the ribbon. Click the small arrow in the lower-right corner of the Alignment group to open the Format Cells dialog directly, then navigate to the Protection tab. Some versions of Excel also offer a Lock Cell button under Review or in the Format dropdown under the Home tab, which toggles the locked state of selected cells with a single click. Whichever method you use, the underlying cell property is the same.

For complex worksheets with many distinct regions — say a dashboard with headers, formula cells, chart objects, and user input areas — it is often more efficient to start by selecting the entire sheet with Ctrl+A, unlocking all cells at once, and then re-locking only the cells that should be protected. This reverse approach saves time when the number of protected cells vastly outnumbers the editable ones. Select all, unlock all, then re-select only headers and formula ranges and re-lock just those cells before turning on protection.

Named ranges work exceptionally well in combination with cell locking. If your workbook already uses named ranges for input areas (for example, a range called InputData or UserEntries), you can select those named ranges quickly using the Name Box, unlock them, and then protect the sheet. This makes your protection setup more maintainable because if you later expand the input area, you just update the named range definition rather than manually unlocking additional cells.

Excel also provides an advanced option called Allow Users to Edit Ranges, found under the Review tab. This feature lets you specify which password-protected ranges specific users or user groups (via Windows authentication) can edit even when the sheet is protected. It is particularly useful in shared corporate environments where different team members need access to different sections of the same protected worksheet. Think of it as role-based access control applied at the cell range level within a single Excel sheet.

When working with how to merge cells in excel alongside protected sheets, be aware that merging and unmerging cells requires the Format Cells permission to be enabled in the Protect Sheet dialog.

Similarly, features like how to create a drop down list in excel using data validation are fully supported on protected sheets — users can interact with drop-down lists in unlocked cells even when the sheet is protected, as long as the data validation rules are set up before protection is applied. The same applies to how to freeze a row in excel: freeze panes must be set before protection is enabled, as this setting cannot be changed on a protected sheet.

Free Excel Basic and Advance Questions and Answers
Test your Excel fundamentals and advanced skills with comprehensive practice questions
Free Excel Formulas Questions and Answers
Practice Excel formula knowledge including IF, VLOOKUP, SUMIF, and more

How to Create a Drop Down List in Excel on Protected Sheets

📋 Worksheet Protection

Worksheet protection in Excel locks a single sheet tab and prevents users from modifying its structure or content based on the permissions you configure. When you protect a worksheet, you can still allow actions like selecting cells, sorting data, using AutoFilter, editing unlocked cells, and interacting with PivotTables. This level of protection is ideal when you want to share a working spreadsheet where users must input data but must not alter formulas, headers, or structural layout.

To apply worksheet protection, go to Review, click Protect Sheet, choose your permissions, optionally enter a password, and click OK. The sheet tab will display a small lock icon in some Excel versions. Users who try to edit a locked cell see a dialog explaining the restriction. To remove protection, go to Review and click Unprotect Sheet, entering the password if one was set. Worksheet protection is removed entirely — there is no partial unprotect for individual cells from this dialog.

📋 Workbook Protection

Workbook structure protection is a separate layer that prevents users from adding, deleting, moving, hiding, or renaming worksheet tabs. It does not lock cell content — a workbook with structure protection but no sheet protection allows users to freely edit all cell data. To enable it, go to Review and click Protect Workbook. Check the Structure checkbox (and optionally Windows if you want to prevent resizing), enter an optional password, and click OK. This is the right tool when your sheet layout is important to maintain.

Workbook protection is particularly valuable when you distribute multi-sheet workbooks where each tab serves a specific purpose — summary, raw data, lookup tables. Without workbook protection, a user could accidentally delete the lookup table sheet and break all VLOOKUP excel formulas throughout the workbook. Combining both worksheet protection on individual tabs and workbook structure protection gives you a comprehensive security model for complex, multi-user Excel files used across teams or departments.

📋 Password Best Practices

Excel sheet passwords are not enterprise-grade encryption — they are intended to prevent accidental changes, not to secure truly sensitive data. That said, using strong, memorable passwords still makes sense for discouraging unauthorized modifications. Use a password of at least 8 characters combining letters, numbers, and symbols. Avoid obvious choices like the sheet name, the company name, or simple sequences like 123456. Store passwords in a secure password manager rather than in a comment cell within the same workbook.

One important limitation: if you forget a sheet protection password, Microsoft does not provide an official recovery mechanism. Third-party tools exist that can remove Excel protection, which is why you should never rely on sheet protection as your only security measure for truly confidential data. For sensitive financial models or HR data, combine Excel protection with file-level encryption (File, Info, Protect Workbook, Encrypt with Password) and restrict access to the file itself through your operating system or cloud storage permission settings.

Pros and Cons of Using Excel Sheet Protection

Pros

  • Prevents accidental deletion of formulas and critical data by non-technical users
  • Allows fine-grained control over which cells, rows, and columns users can edit
  • Supports role-based editing ranges using Windows user authentication
  • Data validation drop-downs and named ranges remain fully functional in protected sheets
  • Quick to set up — protecting a basic sheet takes under one minute
  • Works across Excel 2016, 2019, 2021, and Microsoft 365 desktop and web

Cons

  • Sheet passwords can be removed by third-party tools — not suitable for highly sensitive data
  • Forgotten passwords have no official recovery option from Microsoft
  • Freeze panes, merged cells, and certain formatting must be configured before protection is applied
  • Protection settings are per-sheet, so complex workbooks require protecting each tab individually
  • Excel for the web has limited support for the Allow Users to Edit Ranges feature
  • Users may find protection frustrating if editable cells are not clearly labeled or highlighted
Free Excel Functions Questions and Answers
Master Excel built-in functions including VLOOKUP, INDEX, MATCH, and text functions
Free Excel MCQ Questions and Answers
Multiple-choice Excel questions covering formulas, formatting, charts, and data tools

Sheet Protection Checklist: Before You Share Your Workbook

Unlock all cells users need to edit before activating sheet protection.
Re-lock formula cells, headers, and reference tables to prevent accidental overwriting.
Set freeze panes and row heights before enabling protection — these cannot be changed after.
Configure data validation drop-down lists on input cells before protecting the sheet.
Choose a strong, unique password and save it in a password manager immediately.
Enable the Sort and AutoFilter permissions if users need to work with data tables.
Apply workbook structure protection separately if users should not add or delete sheet tabs.
Test all editable cells to confirm they accept input while locked cells block edits.
Document which cells are unlocked by using a distinct fill color for input areas.
Review the Allow Users to Edit Ranges feature if different users need different access levels.
Use a consistent fill color to signal editable cells to users

A common best practice is to apply a light yellow or light blue fill to all unlocked input cells before protecting the sheet. This visual cue immediately tells users where they can type without triggering a protection warning. Pair this with a brief note at the top of the sheet explaining the color convention, and you dramatically reduce confusion and support requests from colleagues using your protected workbook.

Understanding the distinction between workbook protection and worksheet protection is critical for anyone managing complex Excel files. Worksheet protection, as covered throughout this guide, operates at the tab level — it controls what users can do inside a specific sheet. Workbook protection operates at the file structure level — it controls whether users can manipulate the sheets themselves by adding, renaming, hiding, moving, or deleting tabs. These two protection mechanisms are completely independent and can be used together for maximum control.

To protect the workbook structure, navigate to the Review tab and click Protect Workbook. The dialog offers two checkboxes: Structure and Windows. The Structure option prevents users from inserting or deleting sheets, moving or copying sheets, hiding or unhiding sheets, and renaming sheets. The Windows option (available in older Excel versions) prevents users from moving, resizing, or closing workbook windows. In modern Microsoft 365 versions, the Windows checkbox is often grayed out as window management has changed.

A practical scenario where both layers of protection matter is a monthly reporting template. You might have a Summary tab, a Data tab, and a Config tab. Apply worksheet protection to the Summary tab to prevent users from editing formulas that aggregate data. Apply worksheet protection to the Config tab to lock down lookup tables and reference data. Leave the Data tab unprotected so users can paste in new monthly data freely. Then apply workbook structure protection so users cannot accidentally delete the Config tab that your formulas depend on.

Password management for multiple protected sheets can become cumbersome. If you protect several sheets individually, you need to remember a separate password for each — or use the same password for all of them, which is simpler but slightly less secure. For workbooks where the same team manages all sheets, using a single consistent password across all sheet protections is a reasonable pragmatic choice. For workbooks shared with external parties, consider using different passwords for sheets containing confidential reference data versus general-use input sheets.

VBA macros interact with Excel protection in an important way. If you have macros that need to modify protected cells programmatically, you must unprotect the sheet within the macro, make changes, and then re-protect it. The VBA syntax is straightforward: use ActiveSheet.Unprotect Password:="yourpassword" before making changes and ActiveSheet.Protect Password:="yourpassword" afterward. If you store the password in a VBA module, be aware that VBA project passwords can also be bypassed, so this approach is still not suitable for truly sensitive data.

Excel's protection features also interact with shared workbooks and co-authoring in Microsoft 365. When multiple users co-author a file in OneDrive or SharePoint, sheet protection still applies — co-authors cannot edit locked cells any more than local users can. However, workbook sharing (the legacy feature distinct from co-authoring) has its own protection layer and limitations. Microsoft has been phasing out the legacy shared workbook feature in favor of real-time co-authoring, which handles conflicts differently and respects sheet protection natively without additional configuration.

For organizations that need to deploy protected workbooks at scale — for example, distributing a protected budget input template to 50 department heads — it is worth knowing that you can use VBA or the Excel object model through automation tools to protect multiple sheets programmatically in a batch process. This eliminates manual steps for large deployments and ensures consistent protection settings across all distributed copies. Power users can also leverage Excel's xlsm format to embed protection logic directly in workbook-open events so protection is re-applied automatically every time the file is opened.

Advanced Excel users often combine sheet protection with other features to build sophisticated, user-friendly workbooks that guide users through complex processes without exposing the underlying logic. One powerful combination is using data validation with sheet protection. When you create a drop-down list using data validation on an unlocked cell, users can click the cell and select from the list even on a protected sheet. The drop-down works normally, but users cannot type arbitrary values if the validation is set to reject them. This creates a highly controlled input experience.

Another advanced technique involves using conditional formatting on protected sheets. Conditional formatting rules continue to apply and update dynamically even after a sheet is protected. This means you can build dashboards where cells change color based on values — a budget variance turning red when it exceeds a threshold, for example — without allowing users to modify the formatting rules themselves. The combination of locked cells, conditional formatting, and data validation is the foundation of most professional Excel-based data entry forms and reporting tools.

The vlookup excel function and other lookup formulas deserve special mention in the context of sheet protection. It is very common to protect a sheet that contains VLOOKUP formulas referencing a lookup table on another tab. The formulas themselves should be in locked cells — users should see the results but never be able to edit or delete the formula. The lookup table on the reference tab should also be in a protected sheet to prevent users from modifying the data that VLOOKUP depends on. This two-layer protection keeps your lookup logic intact across all users.

Protecting sheets that contain PivotTables requires extra care. By default, when you protect a sheet, users cannot interact with PivotTables because pivoting, filtering, and drilling down are considered modifications. To allow PivotTable interaction, check the Use PivotTable & PivotChart option in the Protect Sheet permissions dialog. This lets users pivot, filter, and explore data while still preventing them from editing the underlying data source range or modifying the PivotTable structure in ways that would break the report layout.

Charts and objects on protected sheets behave similarly to PivotTables. By default, chart objects are locked and cannot be moved or resized on a protected sheet. If you want users to be able to interact with chart filters or slicers but not move the charts, enable the Edit objects permission in the Protect Sheet dialog. Slicers connected to PivotTables also require the Use PivotTable & PivotChart permission to remain interactive after protection is applied.

For users preparing Excel files for distribution as PDFs, sheet protection plays an important role in the pre-export workflow. Many organizations protect the master Excel file, verify all formulas are correct, review the sheet layout, and then export to PDF as a final immutable snapshot. The PDF export captures the sheet exactly as it appears — with all formula results visible but formulas themselves hidden from view. This workflow is especially common in accounting, legal, and compliance contexts where an auditable, unchangeable record is needed alongside the working Excel model.

Finally, it is worth noting the inner excellence of a well-protected, well-designed Excel workbook: it requires no manual enforcement, no repeated instructions to colleagues about what not to touch, and no time-consuming repairs after someone accidentally deletes a formula. When protection is configured thoughtfully — with clearly labeled input areas, sensible permissions, and appropriate passwords — it effectively automates data governance at the individual file level.

Investing twenty minutes to properly protect a workbook you will share dozens of times is one of the highest-return tasks in Excel productivity. The same principles of structured, deliberate design apply whether you are managing a small team spreadsheet or rolling out enterprise reporting templates across an entire organization.

Practice Excel Formulas Including VLOOKUP and Sheet Protection Scenarios

When you are ready to unprotect a sheet in Excel, the process is just as straightforward as applying protection. Navigate to the Review tab and click Unprotect Sheet. If a password was set, Excel prompts you to enter it before removing protection. Once unprotected, you can edit any cell, change formatting, add or delete rows and columns, and adjust the sheet structure freely. After making your changes, simply re-apply protection through the same Review tab workflow to lock the sheet again.

A common question is whether you can protect specific ranges rather than the entire sheet. The answer is yes, through the Allow Users to Edit Ranges feature available under the Review tab. This dialog lets you define one or more named ranges and assign passwords to each. Users with the correct range password can edit only that range while the rest of the sheet remains protected. Users without the range password see those cells as locked. This is particularly useful in shared input forms where different departments fill in different sections.

Hiding formulas is a related protection technique that many users overlook. In addition to locking cells, you can enable the Hidden property on cells containing formulas. When a cell has both Locked and Hidden properties set, and sheet protection is active, the formula bar displays nothing when the user clicks that cell — they can see the formula result in the cell itself, but the underlying formula is invisible. This protects proprietary calculation logic from being copied or reverse-engineered by users who view the workbook.

For workbooks that will be used repeatedly as templates, consider saving the protected workbook as an Excel Template (.xltx) file. When a user opens a template file, Excel creates a new workbook copy rather than opening the original, which prevents users from accidentally overwriting the master template. Combined with sheet protection, this two-step approach — template format plus protection — ensures that the distributed version always starts from a clean, protected baseline with no risk of contaminating the master file.

Users sometimes ask about the excel data validation feature in relation to protection. Data validation rules you apply before protecting a sheet continue to enforce input restrictions after protection is active. Drop-down lists still appear when users click input cells, error alerts still appear when users type invalid values, and input messages still display when users select validated cells. The key point is that data validation rules themselves cannot be modified on a protected sheet unless you grant the Format Cells permission, which also allows formatting changes.

How to freeze a row in excel is another task that must be completed before sheet protection is enabled. Frozen panes — where the top rows or left columns remain visible as you scroll — are considered a view setting that cannot be changed on a protected sheet by default.

If you need users to have frozen panes for navigation but also need protection, simply set the freeze panes first (View > Freeze Panes), then apply sheet protection. Users will see the frozen rows and columns throughout their session, and you can optionally allow them to use the scroll feature without the ability to change the freeze configuration.

As a final practical note, testing your protection setup thoroughly before distributing a workbook is essential. Open the protected file as you would if you were a recipient — try clicking every area, entering data in every visible input field, attempting to delete rows, and trying to access the Protect Sheet dialog to see if you can remove protection without the password.

Walk through every user workflow the file is designed to support. A five-minute test session before distribution can prevent hours of troubleshooting and data recovery after the fact. Excel protection, when properly set up and tested, is a reliable, durable mechanism that serves its purpose well across all supported environments and versions.

Free Excel Questions and Answers
Comprehensive Excel certification-style practice test covering all core skill areas
Free Excel Trivia Questions and Answers
Fun and challenging Excel trivia questions to test your spreadsheet knowledge

Excel Questions and Answers

How do I protect a sheet in Excel without a password?

To protect a sheet without a password, go to Review and click Protect Sheet. Leave the password field completely blank and click OK. The sheet will be protected against accidental edits, but any user can remove the protection by going to Review and clicking Unprotect Sheet without needing to enter a password. This approach is useful for preventing accidental changes without restricting deliberate administrative edits.

Can I protect multiple sheets in Excel at the same time?

Excel does not have a built-in option to protect all sheets simultaneously through the standard interface. You must protect each sheet individually via the Review tab. However, you can use a simple VBA macro to loop through all sheets in a workbook and apply the same password to each one in a single operation. This is the most efficient approach for workbooks with many tabs that all need the same protection settings.

How do I allow users to edit certain cells on a protected sheet?

Before protecting the sheet, select the cells users should be able to edit. Right-click and choose Format Cells, then go to the Protection tab and uncheck Locked. Click OK, then apply sheet protection via Review. The unlocked cells will remain editable for all users. For more granular control, use the Allow Users to Edit Ranges feature under Review to assign different passwords to different editable ranges within the same protected sheet.

What happens to VLOOKUP formulas when a sheet is protected?

VLOOKUP formulas continue to work normally when a sheet is protected. The formulas calculate and display results just as before. If the formula cells are locked (which is the default), users cannot edit or delete the formulas, but the results update automatically when referenced data changes. To also hide the formula syntax from users, enable the Hidden property on those cells before protecting the sheet — then the formula bar shows nothing when the cell is selected.

How do I remove sheet protection if I forgot the password?

Microsoft does not provide an official method to recover a forgotten Excel sheet protection password. Third-party tools and scripts exist that can remove the password from an .xlsx file by manipulating the underlying XML structure, since .xlsx files are ZIP archives. However, using such tools may violate organizational policies or terms of service. The best prevention is storing all sheet passwords in a secure password manager at the time you create the protection.

Can I protect a sheet and still allow sorting and filtering?

Yes. When you protect a sheet, the Protect Sheet dialog includes checkboxes for Sort and Use AutoFilter. Check both options to allow users to sort data and use AutoFilter drop-downs even while the sheet is protected. Note that users can sort and filter the visible data, but they cannot modify the actual cell content in locked cells. AutoFilter must already be applied to the sheet before protection is turned on for this permission to be effective.

Does Excel sheet protection work in Excel for the web?

Excel for the web supports basic sheet protection — users cannot edit locked cells when protection is active, and the Protect Sheet option is available under the Review tab. However, some advanced features available in the desktop app, such as Allow Users to Edit Ranges with Windows-based user authentication, are not supported in the web version. For most common use cases involving locked cells and basic permissions, the web version handles protection reliably.

How do I protect an entire workbook structure in Excel?

Go to the Review tab and click Protect Workbook. Check the Structure checkbox to prevent users from inserting, deleting, moving, hiding, or renaming sheets. Enter an optional password and click OK. This protection applies to the workbook's sheet structure only — it does not lock cell content on individual sheets. To protect both structure and cell content, apply workbook protection and then individually protect each sheet using the Protect Sheet option.

How do I hide formulas on a protected Excel sheet?

Select the cells containing formulas you want to hide. Right-click and choose Format Cells, then go to the Protection tab. Check both Locked and Hidden, then click OK. Apply sheet protection via Review. Once protected, clicking those cells shows the calculated result but the formula bar displays nothing, keeping your formula logic invisible. This is useful for protecting proprietary calculations while still allowing users to see and use the formula results in their analysis.

Can Excel macros run on a protected sheet?

VBA macros can interact with protected sheets, but they must unprotect the sheet before making any changes to locked cells. Use the command ActiveSheet.Unprotect Password:="yourpassword" at the beginning of the macro and ActiveSheet.Protect Password:="yourpassword" at the end to re-apply protection. If no password was set, you can unprotect without supplying one. Macros that only read data or modify unlocked cells can operate on a protected sheet without unprotecting it first.
▶ Start Quiz