In excel can you lock cells

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:

  1. Select the cells you want to lock.

  2. On the Home tab, in the Alignment group, click the small arrow to open the Format Cells popup window.

  3. 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.

  4. 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.

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

Watch on YouTube & Subscribe to our Channel

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:

  1. Locking/unlocking the cells.
  2. 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.

Format Cells Right Click Menu

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.

Format Cells Window to Lock Cells

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.

Uncheck the Locked Box to Unlock Cells or Range

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.

Protect Sheet Right Click 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.

Protect Sheet Window

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.

Error message for Protected Sheet

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.

Protect Sheet Button on Review Tab

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.

Uncheck box in 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.

Lock Button on QAT to See Change Locked Property for Cell 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.

Lock Cells Ribbon Menu Option

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.

Add to 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.

Add Lock Cell Button to Quick Access Toolbar

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.

Formatting locked cells

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! 🙂


Download Article


Download Article

Locking cells in an Excel spreadsheet can prevent any changes from being made to the data or formulas that reside in those particular cells. Cells that are locked and protected can be unlocked at any time by the user who initially locked the cells. Follow the steps below to learn how to lock and protect cells in Microsoft Excel versions 2010, 2007, and 2003.

To learn how to unlock the cells, read the article How to Open a Password Protected Excel File.

Things You Should Know

  • In all versions of Excel, highlight and right click your cells. Then, select «Format Cells» > «Protection.» Check «Locked» and save.
  • In Excel 2007 and 2010, go to «Review» > «Changes/Protect Sheet» > «Protect worksheet and contents of locked cells.» Type a password click through the prompts to save.
  • In Excel 2003, go to «Tools» > «Protection» > «Protect Sheet.» Check «Protect worksheet and contents of locked cells.» Enter a password and follow the prompts to save.
  1. Image titled Lock Cells in Excel Step 1

    1

    Open the Excel spreadsheet that contains the cells you want locked.

  2. Image titled Lock Cells in Excel Step 2

    2

    Select the cell or cells you want locked.

    Advertisement

  3. Image titled Lock Cells in Excel Step 3

    3

    Right-click on the cells, and select «Format Cells.»

  4. Image titled Lock Cells in Excel Step 4

    4

    Click on the tab labeled «Protection.»

  5. Image titled Lock Cells in Excel Step 5

    5

    Place a checkmark in the box next to the option labeled «Locked.»

  6. Image titled Lock Cells in Excel Step 6

    6

    Click «OK.»

  7. Image titled Lock Cells in Excel Step 7

    7

    Click on the tab labeled «Review» at the top of your Excel spreadsheet.

  8. Image titled Lock Cells in Excel Step 8

    8

    Click on the button labeled «Protect Sheet» from within the «Changes» group.

  9. Image titled Lock Cells in Excel Step 9

    9

    Place a checkmark next to «Protect worksheet and contents of locked cells.»

  10. Image titled Lock Cells in Excel Step 10

    10

    Enter a password in the text box labeled «Password to unprotect sheet.»

  11. Image titled Lock Cells in Excel Step 11

    11

    Click on «OK.»

  12. Image titled Lock Cells in Excel Step 12

    12

    Retype your password into the text box labeled «Reenter password to proceed.»

  13. Image titled Lock Cells in Excel Step 13

    13

    Click «OK.» The cells you selected will now be locked and protected, and can only be unlocked by selecting the cells once again, and entering the password you selected.

  14. Advertisement

  1. Image titled Lock Cells in Excel Step 14

    1

    Open the Excel document that contains the cell or cells you want to lock.

  2. Image titled Lock Cells in Excel Step 15

    2

    Select one or all of the cells you want locked.

  3. Image titled Lock Cells in Excel Step 16

    3

    Right-click on your cell selections, and select «Format Cells» from the drop-down menu.

  4. Image titled Lock Cells in Excel Step 17

    4

    Click on the «Protection» tab.

  5. Image titled Lock Cells in Excel Step 18

    5

    Place a checkmark next to the field labeled «Locked.»

  6. Image titled Lock Cells in Excel Step 19

    6

    Click the «OK» button.

  7. Image titled Lock Cells in Excel Step 20

    7

    Click on the «Tools» menu at the top of your Excel document.

  8. Image titled Lock Cells in Excel Step 21

    8

    Select «Protection» from the list of options.

  9. Image titled Lock Cells in Excel Step 22

    9

    Click on «Protect Sheet.»

  10. Image titled Lock Cells in Excel Step 23

    10

    Place a checkmark next to the option labeled «Protect worksheet and contents of locked cells.»

  11. Image titled Lock Cells in Excel Step 24

    11

    Type a password at the prompt for «Password to unprotect sheet,» then click «OK.»

  12. Image titled Lock Cells in Excel Step 25

    12

    Reenter your password at the prompt for «Reenter password to proceed.»

  13. Image titled Lock Cells in Excel Step 26

    13

    Select «OK.» All the cells you selected will now be locked and protected, and can only be unlocked going forward by selecting the locked cells, and entering the password you initially set up.

  14. Advertisement

Add New Question

  • Question

    How do I lock cells in Excel without the whole document becoming read only?

    Community Answer

    I suppose you want to lock certain cells instead of the whole sheets. To do that, choose the whole sheet, right click and then select «Format Cells», then «Protection», then uncheck the «Locked» option and click okay. Then select the cells you want to lock, right click and select «Format Cells», then Protection; this time, check the «Locked» option and click okay. Now go back to the main tab, select «Review», then click on «Protect Sheet», and do whatever you want to do with it. Now only the cells you «locked» are protected from editing instead of the whole sheet.

  • Question

    How can I protract the single cell while using Excel?

    Community Answer

    You cannot protract a single cell in Excel. You can, however, make it appear longer than the rest of the cells around it by «merging» two or more cells together. Highlight the cells you desire and right click. A menu will pop up allowing you to merge them.

  • Question

    How do I allow changes to some cells of a protected sheet?

    Community Answer

    Select the whole worksheet by clicking the Select All button. On the Home tab, in the Font group, click the Format Cell Font dialog box launcher. On the Protection tab, clear the Locked box and then click OK.

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

Advertisement

Video

  • If multiple users have access to your Excel document, lock all cells that contain important data or complex formulas to prevent the cells from being accidentally changed.

  • If the majority of cells in your Excel document contain valuable data or complex formulas, consider locking or protecting the entire document, then unlock the few cells that are allowed to be modified.

Thanks for submitting a tip for review!

Advertisement

About This Article

Article SummaryX

1. Select the cells.
2. Right-click the cells and select Format Cells.
3. Click Protection.
4. Check the ″Locked″ box and click OK.
5. Click Review.
6. Click Protect Sheet.
7. Check ″Protect worksheet and contents of locked cells.″
8. Enter a password and click OK.

Did this summary help you?

Thanks to all authors for creating a page that has been read 235,187 times.

Is this article up to date?

Watch Video – How to Lock Cells in Excel

Sometimes you may want to lock cells in Excel so that other people can’t make changes to it.

It could be to avoid tampering of critical data or prevent people from making changes in the formulas.

How to Lock Cells in Excel

Before we learn how to lock cells in Excel, you need to understand how it works on a conceptual level.

All cells in Excel are locked by default.

But…

It doesn’t work until you also protect these cells.

Only when you have a combination of cells that are locked and protected can you truly prevent people from making changes.

In this tutorial, you’ll learn:

  • How to lock all the cells in a worksheet in Excel.
  • How to lock some specific cells in Excel.
  • How to hide formula from the locked cell.

So let’s get started.

Lock all the Cells in a Worksheet in Excel

This essentially means that you want to lock the entire worksheet.

Now, since we already know that all the cells are locked by default, all we need to do is to protect the entire worksheet.

Here are the steps to lock all the cells in a worksheet.

  • Click the Review tab.
  • In the Changes group, click on Protect Sheet.How to Lock Cells in Excel - Protect Sheet
  • In the Protect Sheet dialog box:

If you have used a password, it will ask you to reconfirm the password.

Once locked, you’ll notice that most of the options in the ribbon are unavailable, and if someone tries to change anything in the worksheet, it shows a prompt (as shown below):

Error when you try to edit locked cells in Excel

To unlock the worksheet, go to Review –> Changes –> Protect Sheet. If you had used a password to lock the worksheet, it will ask you to enter that password to unlock it.

Lock Some Specific Cells in Excel

Sometimes, you may want to lock some specific cells that contain crucial data points or formulas.

In this case, you need to simply protect the cells that you want to lock and leave the rest as is.

Now, since all the cells are locked by default, if you protect the sheet, all the cells would get locked. Hence you need to first make sure only the cells that you want to protect are locked, and then protect the worksheet.

Here is a simple example where I want to lock B2 and B3, and these contain values that are not to be changed.

How to Lock Cells in Excel - PMT Example

Here are the steps to lock these cells:

If you have used a password, it will ask you to reconfirm the password.

Protect the Entire Sheet (except a few cells)

If you want to protect the entire worksheet, but keep some cell unlocked, you can do that as well.

This can be the case when you have interactive features (such as a drop-down list) that you want to keep functioning even in a protected worksheet.

Here are the steps to do this:

  1. Select the cell(s) that you want to keep unlocked.
  2. Press Control + 1 (hold the control key and then press 1).
  3. In the Format Cells box that opens, click on the ‘Protection’ tab.
  4.  Uncheck the Locked option.Format Cells Dialog box when protecting a worksheet
  5. Click OK.

Now when you protect the entire worksheet, these cells would continue to work as normal. So if you have a drop-down list in it, you can continue to use it (even when the rest of the sheet is locked).

Here are the steps to now protect the entire sheet (except the selected cells):

  • Click the Review tab.
  • In the Changes group, click on Protect Sheet.Protect Sheet option in the ribbon
  • In the Protect Sheet dialog box:

If you have used a password, it will ask you to reconfirm the password.

Hide Formula When the Cells are Locked

Once you lock a cell in Excel, and that cell contains a formula, it’s visible in the formula bar when the cell is selected.

If you don’t want the formula to be visible, here are the steps:

  • Select the cells that you want to lock and also hide the formula from being displayed in the formula bar.
  • Click on the dialog box launcher in the Alignment group in the Home tab (or use the keyboard shortcut Control + 1).
  • In the Format Cells dialog box, in the Protection tab, check the Hidden box.How to Lock Cells in Excel - hide formula

Now when you protect the cells, the formula in it wouldn’t be visible in the formula bar.

TIP: Another way to hide the formula from getting displayed is by disabling the selection of the cell. Since the user can’t select the cell, it’s content wouldn’t get displayed in the formula bar.

So these are some of the ways you can lock cells in Excel. You can lock the entire sheet or only specific cells.

A lot of people ask me if there is a shortcut to lock cells in Excel. While there is no inbuilt one, I am sure you can create one using VBA.

I hope you found this tutorial useful!

You May Also Like the Following Excel Tutorials:

  • How to Lock Formulas in Excel.
  • How to Use Excel Freeze Panes.
  • Excel VLOOKUP Function Examples.
  • How to Insert and Use a Checkbox in Excel.
  • Using Track Changes in Excel.
  • Unhide Columns in Excel.

Here’s how to lock or unlock cells in Microsoft Excel 2016 and 2013.

  1. Select the cells you wish to modify.
  2. Choose the “Home” tab.
  3. In the “Cells” area, select “Format” > “Format Cells“.
  4. Select the “Protection” tab.
  5. Uncheck the box for “Locked” to unlock the cells. Check the box to lock them. Select “OK“.

Contents

  • 1 How do I lock certain cells in Excel?
  • 2 How do I lock cells in Excel but allow typing?
  • 3 How do you lock cells in Excel without protecting sheet?
  • 4 How do I lock all cells in Excel but except one?
  • 5 How do you lock a cell in a formula?
  • 6 What is F4 in Excel?
  • 7 How do I protect an Excel spreadsheet but allow editing?
  • 8 How do you lock a cell in a formula on a laptop?
  • 9 What does Alt R do in Excel?
  • 10 What does F11 do in Excel?
  • 11 What is Ctrl F3 in Excel?
  • 12 How do I lock a cell in Excel Windows 10?
  • 13 What does Alt F5 do in Excel?
  • 14 What does Alt 9 do in Excel?
  • 15 What is Ctrl D in Excel?
  • 16 What does Ctrl F9 do?
  • 17 What does Ctrl F4 do in Excel?
  • 18 What does Ctrl F12 do?

How do I lock certain cells in Excel?

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.

How do I lock cells in Excel but allow typing?

Select the cells you need to protect their formatting but only allow data entry, then press Ctrl + 1 keys simultaneously to open the Format Cells dialog box. 2. In the Format Cells dialog box, uncheck the Locked box under the Protection tab, and then click the OK button.

How do you lock cells in Excel without protecting sheet?

Betreff: Lock cell without protecting worksheet

  1. Start Excel.
  2. Switch to the “Check” tab and select “Remove sheet protection”.
  3. Select all cells by clicking in the top left corner of the table.
  4. In the “Start” tab, select “Format> Format cells> Protection” and uncheck “Locked”.

How do I lock all cells in Excel but except one?

Protect a Worksheet Except for Individual Cells

  1. Click the box to the left of column A (in between column A and row 1).
  2. Right click the same box – select “Format Cells” then click the “Protection” tab.
  3. Make sure the “Locked” check box is checked.
  4. Click “OK” These first few steps just made sure that all cells are locked.

How do you lock a cell in a formula?

For locking the cell reference of a single formula cell, the F4 key can help you easily. Select the formula cell, click on one of the cell reference in the Formula Bar, and press the F4 key. Then the selected cell reference is locked.

What is F4 in Excel?

When you are typing your formula, after you type a cell reference – press the F4 key. Excel automatically makes the cell reference absolute! By continuing to press F4, Excel will cycle through all of the absolute reference possibilities.

How do I protect an Excel spreadsheet but allow editing?

Enable worksheet protection

  1. In your Excel file, select the worksheet tab that you want to protect.
  2. Select the cells that others can edit.
  3. Right-click anywhere in the sheet and select Format Cells (or use Ctrl+1, or Command+1 on the Mac), and then go to the Protection tab and clear Locked.

How do you lock a cell in a formula on a laptop?

3: You are using a laptop keyboard
This is easily fixed! Just hold down the Fn key before you press F4 and it’ll work. Now, you’re ready to use absolute references in your formulas.

What does Alt R do in Excel?

In Microsoft Excel, pressing Alt + R opens the Review tab in the Ribbon. After using this shortcut, you can press an additional key to select a Review tab option.

What does F11 do in Excel?

F11 Creates a chart of the data in the current range in a separate Chart sheet. Shift+F11 inserts a new worksheet. Alt+F11 opens the Microsoft Visual Basic For Applications Editor, in which you can create a macro by using Visual Basic for Applications (VBA).

What is Ctrl F3 in Excel?

You can bring up the Name Manager in Excel by pressing Ctrl + F3. This lists the names used in your current workbook, and you can also define new names, edit existing names or delete names from the Name Manager.

How do I lock a cell in Excel Windows 10?

Here are the steps to Lock Cells with Formulas:

  1. With the cells with formulas selected, press Control + 1 (hold the Control key and then press 1).
  2. In the format cells dialog box, select the Protection tab.
  3. Check the ‘Locked’ option.
  4. Click ok.

What does Alt F5 do in Excel?

h) Alt + Ctrl + Shift + F4: “Alt + Ctrl + Shift + F4” keys closes all open Excel file i.e. these work similar to “Alt + F4” keys. “F5” key is used to display “Go To” dialog box; it will help you in viewing named range. This will restore windows size of the current excel workbook.

What does Alt 9 do in Excel?

Frequently used shortcuts

To do this Press
Add borders Alt+H, B
Delete column Alt+H, D, C
Go to Formula tab Alt+M
Hide the selected rows Ctrl+9

What is Ctrl D in Excel?

Ctrl+D in Excel and Google Sheets
In Microsoft Excel and Google Sheets, pressing Ctrl + D fills and overwrites a cell(s) with the contents of the cell above it in a column. To fill the entire column with the contents of the upper cell, press Ctrl + Shift + Down to select all cells below, and then press Ctrl + D .

What does Ctrl F9 do?

Ctrl+F9: Insert new Empty Field {} braces. Ctrl+Shift+F9: Unlink a field. Alt+F9: Toggle the display of a field’s code.

What does Ctrl F4 do in Excel?

Both CTRL + W and CTRL + F4 will close the current workbook. If you would like to close all workbooks that are open, as well as Excel itself, the shortcut that will achieve this is Alt + F4.

What does Ctrl F12 do?

Ctrl+F12 opens a document in the Word. Shift+F12 saves the Microsoft Word document (like Ctrl+S). Ctrl+Shift+F12 prints a document in the Microsoft Word.

Like this post? Please share to your friends:
  • In other words or word combinations
  • In a word fab
  • In everyday speech the contraction p is generally used instead of the full word pence
  • In other word synonym
  • In a broad sense of this word