Suppose that your boss wants you to protect an entire workbook, but also wants to be able to change a few cells after you enable protection on the workbook. Before you enabled password protection, you had unlocked some cells in the workbook. Now that your boss is done with the workbook, you can lock these cells.
Follow these steps to lock cells in a worksheet:
-
Select the cells you want to lock.
-
On the Home tab, in the Alignment group, click the small arrow to open the Format Cells popup window.
-
On the Protection tab, select the Locked check box, and then click OK to close the popup.
Note: If you try these steps on a workbook or worksheet you haven’t protected, you’ll see the cells are already locked. This means that the cells are ready to be locked when you protect the workbook or worksheet.
-
On the Review tab in the ribbon, in the Changes group, select either Protect Sheet or Protect Workbook, and then reapply protection. See Protect a worksheet or Protect a workbook.
Tip: It’s a best practice to unlock any cells that you may want to change before you protect a worksheet or a workbook, but you can also unlock them after you apply protection. To remove protection, simply remove the password.
In addition to protecting workbooks and worksheets, you can also protect formulas.
Excel for the web can’t lock cells or specific areas of a worksheet.
If you want to lock cells or protect specific areas, click Open in Excel and lock cells to protect them or lock or unlock specific areas of a protected worksheet.
Содержание
- Lock cells to protect them
- Need more help?
- Lock or unlock specific areas of a protected worksheet
- Lock only specific cells and ranges in a protected worksheet
- Unlock ranges on a protected worksheet for users to edit
- Need more help?
- Running Into Issues in Shared Excel Sheets? Learn How to Lock Cells
- Can you lock cells in Excel?
- How to Lock Cells in Excel
- How to Lock Cells in Excel
- 1. Select the cell(s) you want to lock.
- 2. Click on the «Home» tab of your Excel sheet.
- 3. Click on «Format,» located on the right side of the screen.
- 4. Scroll down and click on «Lock Cell.»
- How To Protect a Worksheet in Excel
- 1. Once you’ve locked your cells, click on the «Review» tab.
- 2. Click on «Protect Sheet.»
- 3. Select which permissions you’d like to allow on the sheet, then click «OK.» You can also add a password for additional protection.
- 4. Confirm that your cells are locked by looking for the «Unprotect Sheet» icon in the toolbar.
- How to Protect Specific Cells in Excel (& Get a Shortcut to Lock Cells)
- 1. Select the cells you want to lock then press Ctrl+Shift+F (Windows) or Ctrl + 1 (Mac) to open up the «Format Cells» box. Then, click on the «Protection» tab.
- 2. Select the «Locked» box and click «OK» on the bottom right to finish.
- How to Protect Formulas in Excel
- 1. Click on the cell with the green triangle and look for the yellow triangle warning sign.
- 2. Click on the warning sign and select «Lock Cell.»
- 3. You must then protect your worksheet by clicking on «Protect Sheet» under the «Review» tab.
Lock cells to protect them
Suppose that your boss wants you to protect an entire workbook, but also wants to be able to change a few cells after you enable protection on the workbook. Before you enabled password protection, you had unlocked some cells in the workbook. Now that your boss is done with the workbook, you can lock these cells.
Follow these steps to lock cells in a worksheet:
Select the cells you want to lock.
On the Home tab, in the Alignment group, click the small arrow to open the Format Cells popup window.
On the Protection tab, select the Locked check box, and then click OK to close the popup.
Note: If you try these steps on a workbook or worksheet you haven’t protected, you’ll see the cells are already locked. This means that the cells are ready to be locked when you protect the workbook or worksheet.
On the Review tab in the ribbon, in the Changes group, select either Protect Sheet or Protect Workbook, and then reapply protection. See Protect a worksheet or Protect a workbook.
Tip: It’s a best practice to unlock any cells that you may want to change before you protect a worksheet or a workbook, but you can also unlock them after you apply protection. To remove protection, simply remove the password.
In addition to protecting workbooks and worksheets, you can also protect formulas.
Excel for the web can’t lock cells or specific areas of a worksheet.
If you want to lock cells or protect specific areas, click Open in Excel and lock cells to protect them or lock or unlock specific areas of a protected worksheet.
Need more help?
You can always ask an expert in the Excel Tech Community or get support in the Answers community.
Источник
Lock or unlock specific areas of a protected worksheet
By default, protecting a worksheet locks all cells so none of them are editable. To enable some cell editing, while leaving other cells locked, it’s possible to unlock all the cells. You can lock only specific cells and ranges before you protect the worksheet and, optionally, enable specific users to edit only in specific ranges of a protected sheet.
Lock only specific cells and ranges in a protected worksheet
Follow these steps:
If the worksheet is protected, do the following:
On the Review tab, click Unprotect Sheet (in the Changes group).
Click the Protect Sheet button to Unprotect Sheet when a worksheet is protected.
If prompted, enter the password to unprotect the worksheet.
Select the whole worksheet by clicking the Select All button.
On the Home tab, click the Format Cell Font popup launcher. You can also press Ctrl+Shift+F or Ctrl+1.
In the Format Cells popup, in the Protection tab, uncheck the Locked box and then click OK.
This unlocks all the cells on the worksheet when you protect the worksheet. Now, you can choose the cells you specifically want to lock.
On the worksheet, select just the cells that you want to lock.
Bring up the Format Cells popup window again (Ctrl+Shift+F).
This time, on the Protection tab, check the Locked box and then click OK.
On the Review tab, click Protect Sheet.
In the Allow all users of this worksheet to list, choose the elements that you want users to be able to change.
More information about worksheet elements
Clear this check box
To prevent users from
Select locked cells
Moving the pointer to cells for which the Locked check box is selected on the Protection tab of the Format Cells dialog box. By default, users are allowed to select locked cells.
Select unlocked cells
Moving the pointer to cells for which the Locked check box is cleared on the Protection tab of the Format Cells dialog box. By default, users can select unlocked cells, and they can press the TAB key to move between the unlocked cells on a protected worksheet.
Changing any of the options in the Format Cells or Conditional Formatting dialog boxes. If you applied conditional formats before you protected the worksheet, the formatting continues to change when a user enters a value that satisfies a different condition.
Using any of the column formatting commands, including changing column width or hiding columns ( Home tab, Cells group, Format button).
Using any of the row formatting commands, including changing row height or hiding rows ( Home tab, Cells group, Format button).
Inserting new hyperlinks, even in unlocked cells.
If Delete columns is protected and Insert columns is not also protected, a user can insert columns that he or she cannot delete.
If Delete rows is protected and Insert rows is not also protected, a user can insert rows that he or she cannot delete.
Using any commands to sort data ( Data tab, Sort & Filter group).
Users can’t sort ranges that contain locked cells on a protected worksheet, regardless of this setting.
Using the drop-down arrows to change the filter on ranges when AutoFilters are applied.
Users cannot apply or remove AutoFilters on a protected worksheet, regardless of this setting.
Use PivotTable reports
Formatting, changing the layout, refreshing, or otherwise modifying PivotTable reports, or creating new reports.
Doing any of the following:
Making changes to graphic objects including maps, embedded charts, shapes, text boxes, and controls that you did not unlock before you protected the worksheet. For example, if a worksheet has a button that runs a macro, you can click the button to run the macro, but you cannot delete the button.
Making any changes, such as formatting, to an embedded chart. The chart continues to be updated when you change its source data.
Adding or editing comments.
Viewing scenarios that you have hidden, making changes to scenarios that you have prevented changes to, and deleting these scenarios. Users can change the values in the changing cells, if the cells are not protected, and add new scenarios.
Chart sheet elements
Select this check box
To prevent users from
Making changes to items that are part of the chart, such as data series, axes, and legends. The chart continues to reflect changes made to its source data.
Making changes to graphic objects — including shapes, text boxes, and controls — unless you unlock the objects before you protect the chart sheet.
In the Password to unprotect sheet box, type a password for the sheet, click OK, and then retype the password to confirm it.
The password is optional. If you do not supply a password, any user can unprotect the sheet and change the protected elements.
Make sure that you choose a password that is easy to remember, because if you lose the password, you won’t have access to the protected elements on the worksheet.
Unlock ranges on a protected worksheet for users to edit
To give specific users permission to edit ranges in a protected worksheet, your computer must be running Microsoft Windows XP or later, and your computer must be in a domain. Instead of using permissions that require a domain, you can also specify a password for a range.
Select the worksheet that you want to protect.
On the Review tab, in the Changes group, click Allow Users to Edit Ranges.
This command is available only when the worksheet is not protected.
Do one of the following:
To add a new editable range, click New.
To modify an existing editable range, select it in the Ranges unlocked by a password when sheet is protected box, and then click Modify.
To delete an editable range, select it in the Ranges unlocked by a password when sheet is protected box, and then click Delete.
In the Title box, type the name for the range that you want to unlock.
In the Refers to cells box, type an equal sign ( =), and then type the reference of the range that you want to unlock.
You can also click the Collapse Dialog button, select the range in the worksheet, and then click the Collapse Dialog button again to return to the dialog box.
For password access, in the Range password box, type a password that allows access to the range.
Specifying a password is optional when you plan to use access permissions. Using a password allows you to see user credentials of any authorized person who edits the range.
For access permissions, click Permissions, and then click Add.
In the Enter the object names to select (examples) box, type the names of the users who you want to be able to edit the ranges.
To see how user names should be entered, click examples. To verify that the names are correct, click Check Names.
To specify the type of permission for the user who you selected, in the Permissions box, select or clear the Allow or Deny check boxes, and then click Apply.
Click OK two times.
If prompted for a password, type the password that you specified.
In the Allow Users to Edit Ranges dialog box, click Protect Sheet.
In the Allow all users of this worksheet to list, select the elements that you want users to be able to change.
More information about the worksheet elements
Clear this check box
To prevent users from
Select locked cells
Moving the pointer to cells for which the Locked check box is selected on the Protection tab of the Format Cells dialog box. By default, users are allowed to select locked cells.
Select unlocked cells
Moving the pointer to cells for which the Locked check box is cleared on the Protection tab of the Format Cells dialog box. By default, users can select unlocked cells, and they can press the TAB key to move between the unlocked cells on a protected worksheet.
Changing any of the options in the Format Cells or Conditional Formatting dialog boxes. If you applied conditional formats before you protected the worksheet, the formatting continues to change when a user enters a value that satisfies a different condition.
Using any of the column formatting commands, including changing column width or hiding columns ( Home tab, Cells group, Format button).
Using any of the row formatting commands, including changing row height or hiding rows ( Home tab, Cells group, Format button).
Inserting new hyperlinks, even in unlocked cells.
If Delete columns is protected and Insert columns is not also protected, a user can insert columns that he or she cannot delete.
If Delete rows is protected and Insert rows is not also protected, a user can insert rows that he or she cannot delete.
Using any commands to sort data ( Data tab, Sort & Filter group).
Users can’t sort ranges that contain locked cells on a protected worksheet, regardless of this setting.
Using the drop-down arrows to change the filter on ranges when AutoFilters are applied.
Users cannot apply or remove AutoFilters on a protected worksheet, regardless of this setting.
Use PivotTable reports
Formatting, changing the layout, refreshing, or otherwise modifying PivotTable reports, or creating new reports.
Doing any of the following:
Making changes to graphic objects including maps, embedded charts, shapes, text boxes, and controls that you did not unlock before you protected the worksheet. For example, if a worksheet has a button that runs a macro, you can click the button to run the macro, but you cannot delete the button.
Making any changes, such as formatting, to an embedded chart. The chart continues to be updated when you change its source data.
Adding or editing comments.
Viewing scenarios that you have hidden, making changes to scenarios that you have prevented changes to, and deleting these scenarios. Users can change the values in the changing cells, if the cells are not protected, and add new scenarios.
Chart sheet elements
Select this check box
To prevent users from
Making changes to items that are part of the chart, such as data series, axes, and legends. The chart continues to reflect changes made to its source data.
Making changes to graphic objects — including shapes, text boxes, and controls — unless you unlock the objects before you protect the chart sheet.
In the Password to unprotect sheet box, type a password, click OK, and then retype the password to confirm it.
The password is optional. If you do not supply a password, then any user can unprotect the worksheet and change the protected elements.
Ensure that you choose a password that you can remember. If you lose the password, you will be unable to access to the protected elements on the worksheet.
If a cell belongs to more than one range, users who are authorized to edit any of those ranges can edit the cell.
If a user tries to edit multiple cells at once and is authorized to edit some but not all of those cells, the user will be prompted to edit the cells one-by-one.
Need more help?
You can always ask an expert in the Excel Tech Community or get support in the Answers community.
Источник
Published: May 07, 2021
Ever left something perfectly fine and came back to a total disaster? Any pet owner will probably say, «yes.»
At work, the same can happen when collaborating on a shared document. It’s usually an accidental keyboard stroke that does it. Unless it’s done by your cat, in which case, it’s not accidental – it’s definitely sabotage.
While a mistake like this is understandable, it can be frustrating and time-consuming to fix. When working on shared Excel sheets, you can prevent these mishaps altogether by locking cells and protecting your worksheets.
Whether you’re working on an upcoming report or planning out next quarter’s budget, learn how to prevent anyone from changing or deleting important information on an Excel document.
Can you lock cells in Excel?
Yes, you can lock cells on Excel by following a few simple steps. When you lock a cell in Excel, you restrict users from making changes to your sheets. It’s particularly helpful when working on a project that involves multiple team members.
For instance, let’s say you’re the marketing director and you’ve asked each channel lead (email, website, social) to report their quarterly numbers for an upcoming meeting.
You wouldn’t want someone accidentally deleting important information, or changing formulas or conditional formatting before consulting with key stakeholders. This process ensures that only pre-approved users can edit the cell, which will save you a headache in the future.
Another method is locking your formula cells so that the numbers populate correctly. Jump to that section here.
How to Lock Cells in Excel
- Select the cell(s) you want to lock.
- Click on the ‘Home’ tab of your Excel sheet.
- Click on ‘Format,’ located on the right side of the screen.
- Scroll down and click on ‘Lock Cell.’
- Once you’ve locked your cells, click on the ‘Review’ tab.
- Click on ‘Protect Sheet.’
- Select which permissions you’d like to allow on the sheet, then click ‘OK.’
- Confirm that your cells are locked by looking for the ‘Unprotect Sheet’ icon in the toolbar.
How to Lock Cells in Excel
1. Select the cell(s) you want to lock.
2. Click on the «Home» tab of your Excel sheet.
3. Click on «Format,» located on the right side of the screen.
4. Scroll down and click on «Lock Cell.»
Once you complete these steps, your cells will be locked but can still be edited. To ensure the cells aren’t editable, you’ll also have to protect your worksheet. Find those steps in the next section.
How To Protect a Worksheet in Excel
1. Once you’ve locked your cells, click on the «Review» tab.
2. Click on «Protect Sheet.»
3. Select which permissions you’d like to allow on the sheet, then click «OK.» You can also add a password for additional protection.
Note: If you don’t add a password, any user can click «Unprotect Sheet» to make changes to the sheet. When you add a password, only those with the code can do so.
4. Confirm that your cells are locked by looking for the «Unprotect Sheet» icon in the toolbar.
You can also double-check that your worksheet is protected by attempting to write something in the locked cells. You should get this alert.
How to Protect Specific Cells in Excel (& Get a Shortcut to Lock Cells)
1. Select the cells you want to lock then press Ctrl+Shift+F (Windows) or Ctrl + 1 (Mac) to open up the «Format Cells» box. Then, click on the «Protection» tab.
2. Select the «Locked» box and click «OK» on the bottom right to finish.
These simple steps offer both a shortcut to locking cells in bulk and a way to protect specific cells in Excel.
How to Protect Formulas in Excel
A green triangle indicates an error in your cell’s formula. The error sign will show up if your formula is unprotected.
Any unauthorized or accidental changes to a formula can alter the integrity of the data reported in the sheet. As such, it’s important to always lock your formulas to prevent mistakes.
Here’s how you protect your formulas in Excel:
1. Click on the cell with the green triangle and look for the yellow triangle warning sign.
2. Click on the warning sign and select «Lock Cell.»
3. You must then protect your worksheet by clicking on «Protect Sheet» under the «Review» tab.
Another way to protect your formulas is by locking each formula cell individually as you build your worksheet (as outlined here) and protecting your sheet once all formulas have been locked.
Whether you’re the person fixing the mistake or the one who made it, following these steps will ensure it never happens again. And your cat will have to find something else to sabotage.
Источник
Bottom Line: Learn how to lock individual cells or ranges in Excel so that users cannot change the formulas or contents of protected cells. Plus a few bonus tips to save time with the setup.
Skill Level: Beginner
Video Tutorial
Download the Excel File
You can download the file that I use in the video tutorial by clicking below.
Protecting Your Work from Unwanted Changes
If you share your spreadsheets with other users, you’ve probably found that there are specific cells you don’t want them to modify. This is especially true for cells that contain formulas and special formatting.
The great news is that you can lock or unlock any cell, or a whole range of cells, to keep your work protected. It’s easy to do, and it involves two basic steps:
- Locking/unlocking the cells.
- Protecting the worksheet.
Here’s how to prevent users from changing some cells.
Step 1: Lock and Unlock Specific Cells or Ranges
Right-click on the cell or range you want to change, and choose Format Cells from the menu that appears.
This will bring up the Format Cells window (keyboard shortcut for this window is Ctrl + 1.). Choose the tab that says Protection.
Next, make sure that the Locked option is checked.
Locked is the default setting for all cells in a new worksheet/workbook.
Once we protect the worksheet (in the next step) those locked cells will not be able to be altered by users.
If you want users to be able to edit a particular cell or range, uncheck the Locked box so they are unlocked. Since cells are locked by default, most of the job will be going through the sheet and unlocking cells that can be edited by users.
I share some shortcuts to make this process faster in the Bonus section below.
Step 2: Protect the Worksheet
Now that you’ve locked/unlocked the cells that you want users to be able to edit, you want to protect the sheet. Once you protect the sheet, users cannot change the locked cells. However, they can still modify the unlocked cells.
To protect the sheet, simply right-click on the tab at the bottom of the sheet, and choose Protect Sheet… from the menu.
This will bring up the Protect Sheet window. If you want your sheet to be password protected, you have the option of entering a password here. Adding a password is optional. Click OK.
If you’ve chosen to enter a password, then you will be prompted to verify your entry after you’ve clicked OK.
With the sheet protected, users will be unable to change the cells that are locked. If they try to make changes, they will get an error/warning message that looks like this.
You can unprotect the sheet in the same way that you protected it, by right-clicking on the sheet tab. An alternative way to protect and unprotect sheets is by using the Protect Sheet button in the Review tab of the Ribbon.
The button text displays the opposite of the current state. It says Protect Sheet when the sheet is unprotected, and Unprotect Sheet when it is protected.
It’s important to note that all cells can be edited when the sheet is unprotected. After making changes you must protect the sheet again and Save the workbook before sending or sharing with other users.
3 Bonus Tips for Locking Cells and Protecting Sheets
As you can see, it is fairly simple to protect your formulas and formatting from being changed! But I’d like to leave you with three tips to help make it faster & easier for both you and your users.
1. Prevent Locked Cells From Being Selected
This tip will help make it faster and easier for your users to input data in the sheet.
Turning off the Select locked cells option prevents the locked cells from being selected with either the mouse or keyboard (arrow or tab keys). This means users will only be able to select the unlocked cells that they need to edit. They can quickly hit the Tab, Enter, or arrow keys to move to the next editable cell.
To make this change, you just uncheck the option that says “Select locked cells” on the Protect Sheet window.
After pressing OK, you will only be able to select the unlocked cells.
2. Add a button for locking cells to the Quick Access Toolbar
This allows you to quickly see the locked setting for a cell or range.
From the Home tab on the Ribbon, you can open the drop-down menu under the Format button and see the option to Lock Cell.
If you right-click on the Lock Cell option, another menu appears giving you the option to add the button to the Quick Access Toolbar.
When you select this option, the button will be added to the Quick Access Toolbar at the top of the workbook. This button will remain each time you use Excel. You can easily lock and unlock specific cells on your sheet by clicking on this button.
You can also see if the active cell locked or unlocked. The button will have a dark background if the selection is locked.
It’s important to note that this only shows the locked state of the active cell. If you have multiple cells selected, the active cell is the cell you selected first and appears with no fill shading.
Mixed Lock State
If you select a range that contains both locked and unlocked cells, you will see a solid box for the Locked checkbox in the Format Cells window. This denotes the mixed state.
You can click the checkbox to lock or unlock ALL cells in the selected range.
3. Use different formatting for locked cells
By changing the formatting of cells that are locked, you give your users a visual clue that those cells are off limits. In this example the locked cells have a gray fill color. The unlocked (editable) cells are white. You can also provide a guide on the sheet or instructions tab.
You might be wondering where I found this template for a quote. I got it from the template library. You can access the library by going to the File tab, choosing New, and using the search word “quote.”
You can find all sorts of useful templates there, including invoices, calendars, to-do lists, budgets, and more.
Conclusion
By locking your cells and protecting your sheet, you can keep your formulas safe from tampering by other users, and prevent mistakes.
I hope this simple tutorial proves helpful to you. Please leave a comment below if you have any tips or questions about locking cells, protecting sheets with passwords, or preventing users from changing cells.
Thank you! 🙂
Many users used to lock cells in Excel so that no one can modify the content of the protected cells without their permission. Thus, if you also want to restrict someone from making changes to your Excel cells then read this blog. This post contains different ways to lock Excel cells and make them protected.
Quick Ways |
Step-By-Step Solutions Guide |
Way 1- Lock Cells In Excel Worksheet |
Choose the cells >> go to the Home tab and then from the Alignment…Complete Steps |
Way 2- Lock Some Specific Cells In Excel |
Choose the entire worksheet >> go to Home tab >> hit sign of the dialog box launcher…Complete Steps |
Way 3- Lock Excel Cells Using VBA Code |
Choose entire cells in Excel spreadsheet >> go to the Home tab >> cells >> Format…Complete Steps |
Way 4- Protect Entire Worksheet Except Few Cells |
Press Control + 1 key >> in the opened Format Cells dialog box >> go to ‘Protection’...Complete Steps |
Way 5- Lock Formula Cells |
Choose Format Cells >> go to Protection tab >> untick Locked option >> OK…Complete Steps |
To repair & recover corrupted Excel file data, we recommend this tool:
This software will prevent Excel workbook data such as BI data, financial reports & other analytical information from corruption and data loss. With this software you can rebuild corrupt Excel files and restore every single visual representation & dataset to its original, intact state in 3 easy steps:
- Download Excel File Repair Tool rated Excellent by Softpedia, Softonic & CNET.
- Select the corrupt Excel file (XLS, XLSX) & click Repair to initiate the repair process.
- Preview the repaired files and click Save File to save the files at desired location.
What’s The Need To Lock Cells In Excel?
The plus point of locking cells in Excel is that it protects your data from the unwanted changes.
Suppose you have to share your Excel spreadsheet with other users and there are some specific cells which you don’t want to get modified. In that case, cell lock is the best trick to avoid formula and formatting changes like issues.
Way 1- Lock Cells In Excel Worksheet
Follow the below-mentioned solutions to do so:
- Choose the cells which you need to lock.
- Go to the Home tab and then from the Alignment group tap to the small arrow present across it. This will open the windows of Format Cells.
- Now in the format cell window go to the Protection tab and choose the check box of Locked After that tap to the OK button to shut off this popup window.
Note: If you are attempting these steps on the worksheet or workbook which you haven’t protected then you will find that the cells are locked already. This implies that the cell can also be locked when the workbook or worksheet is protected.
- From the excel ribbon hit the Review After that from the Changes group, you have to choose either the Protect Workbook or Protect Sheet.
- Next, you have to reapply the protection over your workbook or worksheet.
Tip: well it’s a best solution to unlock cells which you need to modify before protecting a workbook or worksheet. But don’t get worried as you can unlock them easily even after applying protection over it. For removing up the protection, all you need to do is just remove the applied password.
Also Read: 5 Tricks To Protect Excel Workbook From Editing
Way 2- Lock Some Specific Cells In Excel
Sometimes you just need to lock some individual cells which contain important data or formulas. In such cases, only protect the cells which you need to lock leaving the rest one as it is.
By default, entire cells are comes locked, so if you apply protection to your sheet then entire cells are also get locked.
So, make sure that only those cells are protected which you want to lock and after that only apply protection to the whole worksheet.
Follow the steps to lock some specific cells in Excel
- Choose entire worksheet and then go to the Home tab.
- After that hit, the sign of the dialog box launcher presents the alignment group.
- Now in the opened dialog box of Format Cells, got to the Protection tab and uncheck the Locked option. Hit the OK button.
- Choose the cells which you need to lock.
- Again make a tap over the dialog box launcher present in the Alignment group which is under the Home tab.
- Now again in the opened dialog box of Format Cells go to the Protection tab and make a check mark across the Locked option.
- Doing this will unlock entire cells of your worksheet except the one which you have selected for locking.
- Now go to the Review tab and then from the Changes group hit the Protect Sheet option.
- From the opened dialogue box of Protect Sheet:
- Check whether the option of ‘Protect worksheet and contents of locked cells’ is checked or not. If it’s not then check it.
- Enter the password to apply password on your sheet.
- Now specify the permission which you want to assign to other users. By default, you will see that the first two options are already selected. Using which user can easily make selection for the locked or unlocked cells.
- Apart from this you can also allow other options like inserting rows/columns or making changes in the formatting.
- Tap to the OK button.
If you are applying any password then you are asked to reconfirm it.
When the next time you try to edit those specific cells, you will get the following error message pop-up dialog box.
Way 3- Lock Excel Cells Using VBA Code
- Choose entire cells in your Excel spreadsheet.
- Now go to the Home tab first and then to cells from this cell section tap on the Format option and choose the format cells option.
- This will open a Format Cells dialogue box. On this opened dialog box, you need hit the Protection tab. Here you have un-select the option Locked.
- Now in your Excel file where name of your sheet appears. Make a right click from your mouse and choose the View Code.
- This will open Microsoft Visual Basic for Applications dialogue box. In this opened white sheet along with the dialogue box, you just need to type the below code.
- In the written code, we have selected the data range from C7 to E11. And have also applied a password like, 1234.
- After entering the complete code go to the Debug Here you will find a Run Sub/User Form (F5) option tap on it.
- Now you will see that your Excel worksheet is opening along with a password window.
- So, write same password that you as allotted in the VBA code eg: 1234.
- After doing this whenever you approach for making changes in the desired cells of the Excel. This will throw a warning message stating that “you can’t edit the cells as it is protected”.
Note: To unlock the cells locked with Excel VBA code you have to follow the same unlocking procedures as explained earlier.
Also Read; Top 3 Methods To Unlock Password Protected Excel File
Way 4- Protect Entire Worksheet Except Few Cells
In some cases, people also want to protect the entire worksheet by keeping some of the cells unlocked.
Well, such a situation arises when you have added interactive features in your worksheet like a drop-down list. And you want that your drop-down keeps working even when the worksheet is protected.
To accomplish this task, just follow the below-mentioned steps:
- Make a selection of the cells which you want to keep unlocked.
- Press the Control + 1 key from your keyboard.
- In the opened Format Cells dialog box go to the ‘Protection’.
- Unselect the Locked option and hit the OK button.
Now if the entire worksheet is kept protected, these particular cells should work normally.
For this you have to perform the following steps, so as to protect the entire worksheet except the selected cells:
- Hit the Review tab and then from the Changes group tap to the Protect Sheet icon.
- In the opened Protect Sheet dialog box:
- Check whether the option of ‘Protect worksheet and contents of locked cells’ is checked or not. If it’s not then check it.
- Enter the password to apply password on your sheet).
- Now specify the permission which you want to assign to other users. By default, you will see that the first two options are already selected. Using which user can easily make selection for the locked or unlocked cells.
- Apart from this you can also allow other options like inserting rows/columns or making changes in the formatting.
Way 5- Lock Formula Cells
To lock formula cells, the very first thing you need to do is unlock all the cells and then only lock the cells having the formula in it. At last protect the sheet.
Well if you don’t know how to perform all these tasks then follow the below steps:
- Choose entire cell of your worksheet.
- Now make a right click and from the listed option choose the Format Cells.
- On the opened format cell window go to the Protection tab and untick the check box of Locked option. After that hit the OK button.
- Go to the Home tab and then from the Editing group choose the Find & Select.
- Hit the Go To Special option.
- Choose Formulas and hit the OK button.
You will see that after doing these steps Excel will selects all the formula cells.
- Press the CTRL + 1 button from your keyboard.
- Go to the Protection tab and select the check box of Locked option. After that press the OK button.
Note:
If you select the check box of Hidden option then the user will not be able to see the formula within the formula bar even after choosing the formula cells.
Always keep in mind that locking cells doesn’t have any effect until and unless the worksheet is protected.
- So now it’s time to protect your Excel sheet.
After this, you will see that entire the formula cells are been locked. In case of editing these cells, firstly you need to unprotect the worksheet.
Use Excel Repair Tool to Repair/Recover Corrupted Excel Documents
MS Excel Repair Tool is a special tool that is specifically designed to repair any sort of issues, corruption, errors in Excel file. This can also easily restore entire lost Excel data including cell comments, charts, worksheet properties, and other related data.
It is a unique tool that can repair multiple corrupted Excel files in one repair cycle and restore data to a new blank Excel file or the preferred location. The tool has the ability to recover data without modifying the original formatting.
- The interface is very simple, with a large toolbar of buttons to add files or folders to the application.
- With this software, you can repair your corrupted Excel file.
- It can easily restore all corrupt excel files and also recover everything which includes cell comments, charts, worksheet properties, and other related data.
- The corrupted excel file can be restored to a new blank Excel file.
- It has the ability to recover the complete Excel file data from the file and restore them even without modifying the original formatting.
* Free version of the product only previews recoverable data.
Steps to Utilize MS Excel Repair Tool:
Related FAQs:
Can I Lock Multiple Cells in Excel?
Yes, you can lock multiple cells in Excel through freeze panes. Apart from that, you can use a shortcut key- F4 to lock specific columns or rows in the document as well as the range of cells that you want to lock.
How Do I Make a Cell Non-Editable in Excel?
To make a cell non editable in Excel, you need to make cell as read only using VBA code. Although using the VBA code helps to make cell as read-only so that no one can edit them and even you don’t have to lock the cells to protect your worksheet data.
Does F4 Lock Cells in Excel?
Yes, the F4 key is a shortcut mode or we can say the easiest way to lock cells in the MS Excel.
Bottom Line
Locking cells in Excel help you to keep the formula completely safe from being tempered by any third-party user.
Hopefully, this informative tutorial seems helpful to you on how to protect cells in excel without protecting sheets. Don’t forget to leave a comment if you have any queries or tips to share about how to lock cells in Excel and protect them.
Priyanka is an entrepreneur & content marketing expert. She writes tech blogs and has expertise in MS Office, Excel, and other tech subjects. Her distinctive art of presenting tech information in the easy-to-understand language is very impressive. When not writing, she loves unplanned travels.
Lock All Cells | Lock Specific Cells | Lock Formula Cells
You can lock cells in Excel if you want to protect cells from being edited.
Lock All Cells
By default, all cells are locked. However, locking cells has no effect until you protect the worksheet.
1. Select all cells.
2. Right click, and then click Format Cells (or press CTRL + 1).
3. On the Protection tab, you can verify that all cells are locked by default.
4. Click OK or Cancel.
5. Protect the sheet.
All cells are locked now. To unprotect a worksheet, right click on the worksheet tab and click Unprotect Sheet. The password for the downloadable Excel file is «easy».
Lock Specific Cells
To lock specific cells in Excel, first unlock all cells. Next, lock specific cells. Finally, protect the sheet.
1. Select all cells.
2. Right click, and then click Format Cells (or press CTRL + 1).
3. On the Protection tab, uncheck the Locked check box and click OK.
4. For example, select cell A1 and cell A2.
5. Right click, and then click Format Cells (or press CTRL + 1).
6. On the Protection tab, check the Locked check box and click OK.
Again, locking cells has no effect until you protect the worksheet.
7. Protect the sheet.
Cell A1 and cell A2 are locked now. To edit these cells, you have to unprotect the sheet. The password for the downloadable Excel file is «easy». You can still edit all other cells.
Lock Formula Cells
To lock all cells that contain formulas, first unlock all cells. Next, lock all formula cells. Finally, protect the sheet.
1. Select all cells.
2. Right click, and then click Format Cells (or press CTRL + 1).
3. On the Protection tab, uncheck the Locked check box and click OK.
4. On the Home tab, in the Editing group, click Find & Select.
5. Click Go To Special.
6. Select Formulas and click OK.
Excel selects all formula cells.
7. Press CTRL + 1.
8. On the Protection tab, check the Locked check box and click OK.
Note: if you also check the Hidden check box, users cannot see the formula in the formula bar when they select cell A2, B2, C2 or D2.
Again, locking cells has no effect until you protect the worksheet.
9. Protect the sheet.
All formula cells are locked now. To edit these cells, you have to unprotect the sheet. The password for the downloadable Excel file is «easy». You can still edit all other cells.