Tech Reference

How to lock cells in Microsoft Excel, so you need a password to change or erase data

excel
It's simple to lock and protect your cells in Excel. Shutterstock
Read in app

Locking particular cells in Microsoft Excel can be a slightly tricky process, but once you've figured it out, it can be extremely valuable. 

Not only does it allow you to share an Excel sheet and all its corresponding data without worry over whether someone will change it all, it can also help make sure you or somebody else doesn't accidentally erase values or headings you need to have. 

Check out the products mentioned in this article:

Macbook Pro (From $1,299 at Best Buy)

Microsoft Surface Pro 7 (From $999 at Best Buy)

How to lock cells in Excel

1. Select your whole sheet, done most easily by pressing Crtl + A on your PC keyboard, or Command + A on a Mac.

2. In the "Home" tab, click on the arrow under "Alignment" to open the "Format Cells" pop-up window.

3. Click on the "Protection" tab.

4. Uncheck the box next to "Locked". Most Excel documents will come with this checked by default. You need to uncheck this, then click "OK" at the bottom of the pop-up.

How to lock cells in Excel
Uncheck the "Locked" box.  Ryan Ariano/Business Insider

5. Now select the specific cells you want to lock.

6. Click on the arrow under "Alignment" and again click on "Protection" in the "Format Cells" pop-up.

7. Click the box next to "Locked." Then click "OK" at the bottom of the pop-up.

How to lock cells in Excel
Check the box next to "Locked."  Ryan Ariano/Business Insider

8. From the top row of the toolbar click on the "Review" tab to change toolbar groupings available.

9. Click on "Protect Sheet" in the "Protect" tab.

How to lock cells in Excel
Click on the "Protect Sheet" icon.  Ryan Ariano/Business Insider

10. Once you've clicked on "Protect Sheet," the "Protect Sheet" pop-up will appear and allow you to decide what will be restricted in the sheet.

11. If you want to allow the person you send the sheet to have the ability to format, change, and move all the data, except the cells you want to lock, check every box except for the top one (which says "Select Locked Cells"). You can scroll down and see if there are any operations you don't want to allow them to make.

12. You'll be asked to enter a password. Make sure you remember it, since you won't be able to unlock the cells without entering the password. Then click "OK" at the bottom.

How to lock cells in Excel
Enter the password you want.  Ryan Ariano/Business Insider

13. You'll be asked to enter the password again to confirm. Once you've done so, the cells you selected earlier will be locked, but the others will be editable. 

14. To make all cells editable again, click on "Unprotect Sheet" — which is in the "Protect" tab under "Review" — and re-enter your password. The cells will now be unlocked.

How to lock cells in Excel
Re-enter your password to lock the sheet.  Ryan Ariano/Business Insider

Related coverage from How To Do Everything: Tech:

Insider Inc. receives a commission when you buy through our links.

Read next

Ryan Ariano grew up in Baltimore when the Macintosh was cutting edge, lived in Los Angeles as Blackberries gave way to iPhones, and now lives in Jackson Hole where his life is held together by Bluetooth. He writes on a wide range of topics but especially loves nerding out across the tech spectrum. Learn more about how our team of experts tests and reviews products at Insider here.