How to Lock Cells in Excel: A Step-by-Step Guide

Locking cells in Excel is a handy feature that allows you to protect specific data from being edited or deleted. This can be particularly useful when sharing spreadsheets with others or when you want to prevent accidental changes to important information. In just a few simple steps, you can secure your data and have peace of mind that it remains intact.

Step by Step Tutorial on How to Lock Cells in Excel

Before we dive into the step-by-step process, it’s important to understand that locking cells in Excel is part of the worksheet protection feature. By default, all cells in a worksheet are locked, but this doesn’t take effect until you protect the worksheet. Let’s walk through how to lock cells and protect your worksheet.

Step 1: Select the cells you want to lock

Click and drag your mouse to highlight the cells you wish to lock.

Selecting the cells is the first crucial step in the process. Make sure to carefully select only the cells you want to lock, as once the worksheet is protected, you won’t be able to make changes to these cells without unprotecting the sheet.

Step 2: Open the Format Cells dialog box

Right-click on the selected cells and choose ‘Format Cells,’ or press Ctrl + 1 on your keyboard.

The Format Cells dialog box is where you can find various settings for your cells, including the protection tab, which we’ll use to lock the cells.

Step 3: Check the ‘Locked’ option

In the Format Cells dialog box, click on the ‘Protection’ tab and ensure the ‘Locked’ checkbox is ticked.

By default, the ‘Locked’ option is already checked for all cells. If you’ve previously unlocked cells and now want to lock them again, make sure to recheck this box.

Step 4: Protect the worksheet

Go to the ‘Review’ tab, click on ‘Protect Sheet,’ and enter a password if desired.

Protecting the worksheet is what activates the cell locking. You can choose to set a password, which will be required to unprotect the sheet in the future, or you can leave it without a password for easier access.

Step 5: Confirm the protection

Click ‘OK’ to protect the sheet, and if you’ve set a password, enter it again to confirm.

After confirming the protection, your selected cells are now locked. Anyone who tries to edit these cells will receive a warning message stating that the cell is protected and therefore not editable.

Once you’ve completed these steps, your selected cells will be locked, and the worksheet will be protected. Only users with the password (if you’ve set one) will be able to unprotect the worksheet and make changes to the locked cells.

Tips for Locking Cells in Excel

  • Always remember to protect the worksheet after locking cells, or else the locking won’t be effective.
  • When sharing protected worksheets, make sure to communicate the password to authorized users if they need to make edits.
  • You can also lock specific cells without selecting the entire range. Just hold down the Ctrl key and click on the individual cells you want to lock.
  • If you want to lock all cells except a few, you can unlock those specific cells by unticking the ‘Locked’ option in the Format Cells dialog box before protecting the sheet.
  • Keep in mind that locking cells only prevents editing. Users can still view the contents of the locked cells unless you also hide them.

Frequently Asked Questions

Can I lock cells without a password?

Yes, you can protect a worksheet and lock the cells without setting a password. However, this means anyone can unprotect the sheet and edit the cells.

What if I forget the password to unprotect the worksheet?

Unfortunately, if you forget the password, there’s no simple way to recover it. You’ll need to use third-party software or services to try and unlock the protected sheet.

Can I still filter or sort data in locked cells?

You can allow certain actions, like sorting and filtering, when you protect the sheet by checking the corresponding options under ‘Allow all users of this worksheet to.’

Can I lock cells in a shared workbook?

Locking cells in a shared workbook can be more complex as it involves different permissions for multiple users. You’ll need to manage user permissions carefully to ensure the correct cells are locked for the right people.

How do I unlock cells after they’ve been locked?

To unlock cells, you need to unprotect the worksheet by going to the ‘Review’ tab and clicking ‘Unprotect Sheet.’ You’ll need the password if one was set.


  1. Select the cells you want to lock.
  2. Open the Format Cells dialog box.
  3. Check the ‘Locked’ option.
  4. Protect the worksheet.
  5. Confirm the protection.


Locking cells in Excel is a simple yet powerful way to secure your data from unwanted changes. Whether you’re a seasoned Excel user or a beginner, understanding how to lock cells is an essential skill that can save you from potential headaches down the line. With the steps outlined in this article, you should be able to lock and protect your cells confidently.

Remember, while locking cells is great for preventing edits, it’s equally important to practice good spreadsheet management. Regularly back up your files, keep your data organized, and communicate clearly with others when sharing protected worksheets. And if you ever run into trouble or forget how to lock cells in Excel, just come back to this guide for a quick refresher. Happy Excel-ing!

Join Our Free Newsletter

Featured guides and deals

You may opt out at any time. Read our Privacy Policy