Skip to main content

How to lock and protect formulas in Excel?

When you create a worksheet, sometimes you need to use some formulas, and you don’t want other users to change, edit or delete the formulas. The easiest and most common way of preventing people from playing with your formulas is to lock and protect cells which contain formulas in your worksheet. Please go to lock and protect the formulas as follows:

Lock and protect formulas with Format Cells and Protect Sheet functions

Lock and protect formulas with Worksheet Design good idea3

arrow blue right bubble Lock and protect formulas with Format Cells and Protect Sheet functions

By default, all cells on a worksheet are locked, so you must unlock all of the cells first.

1. Select the whole worksheet with Ctrl + A, and right click, choose Format Cells from the context menu.

2. And a Format Cells dialog box will pop out. Click Protection, and unchecked the Locked option. Click OK. The whole worksheet has been unlocked.

doc-protect-formulas1

3. Then click Home > Find & Select > Go To Special, and a Go To Special dialog box will appear. Check Formulas from Select option, and then click OK. See screenshot:

doc-protect-formulas2

4. All of the cells which contain formulas will be selected.

5. Then go to lock the select cells. Right click on the selected cells, and choose Format Cells from the context menu, and a Format Cells dialog box will display. Click Protection, check the Locked checkbox. See screenshot:
doc-protect-formulas3

6. And then click Review > Protect Sheet, and a Protect Sheet dialog box will pop out, you can enter the password in the Passwordto unprotect sheet box. See screenshot:

doc-protect-formulas4

7. Then click OK. And another Confirm Password dialog box will appear. Reenter your password. And click OK.

doc-protect-formulas5

And then all cells which contain formulas have been locked and protected. In this case, you cannot modify the formulas, but you can edit other cells.


arrow blue right bubble Lock and protect formulas with Worksheet Design

If you have installed Kutools for Excel, you can lock and protect formulas quickly by using Worksheet Design utility.
Kutools for Excel, with more than 300 handy functions, makes your jobs more easier. 

After free installing Kutools for Excel, please do as below:

1. Click Kutools Plus > Worksheet Design to enable the Design group. See screenshot:
doc protect formulas 1

2. Then click Highlight Formulas to highlight all formula cells. See screenshot:
doc kutools design 2

3.Select all the highlighted cells and click Selection Lock to lock the formulas. And there is a dialog pops out to remind you that the fomulas cannot lock until protect the sheet. See screenshots:
doc kutools design 3

4. Now click Protect Sheet to type the password to protect the sheet. See screenshots:
doc kutools design 4

Note

1. Now the formulas are locked and protected, and you can click Close Design to disable the Design tab.

2. If you want to unprotect the sheet, you just need to click Worksheet Design > Unprotect Sheet.
doc kutools design 5

In Worksheet Design group, you can highlight unlock cell, name range and so on.


Best Office Productivity Tools

Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

kte tab 201905


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Comments (46)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Useful guide, however, I don't think if this is responding to my need. to explain a bit of my need I wanted to lock cells with formulas and formats but I want the formulas to generate what they are supposed to do. i.e. I have VLOOKUP formula which I want to vlookup value from another sheet based on the ID so when I add the unique ID the VLOOKUP formula doesn't return since the cell is locked.. in short, I want my formulas to work but don't allow other people to modify and delete the formulas!

Much appreciated any clear guidelines
This comment was minimized by the moderator on the site
Hi I would like to protect cells that has formulas but when I lock the sheet with a password, I cannot group and un-group cells that are grouped. How do I protect the sheet and still have the functionality to group and un-group. I have inserted the following VB code: Sub EnableOutlining() 'Update 20140603 Dim xWs As Worksheet Set xWs = Application.ActiveSheet Dim xPws As String xPws = Application.InputBox("Password:", xTitleId, "", Type:=2) xWs.Protect Password:=xPws, Userinterfaceonly:=True xWs.EnableOutlining = True End Sub It works but when I open and close the file I need to run the code each time. Is there a code where this is not required? Thanks
This comment was minimized by the moderator on the site
very useful good explanation thanks
This comment was minimized by the moderator on the site
This is the only page that showed step 5. And all my formulas are protected. But how do I protect formulas AND all the text I put in. The Workbook I created is an invoice ledger. So I have cells with text, that is not protected. All I want them to do is fill in the ledger with the purchase dollars. Not to be able to change category names, or pager titles.
This comment was minimized by the moderator on the site
This locks the cell with the formula, but also is preventing changing FONT colour and Strikethrough etc?
This comment was minimized by the moderator on the site
Have gone through this half a dozen times, yes! it is locking cells containing formula, but all formatting is greyed out. I have an Allocation Sheet, which has DAYS and NIGHTS on if we do DAYS Nights formula is strikethrough, and vice versa, but change DAYS to NIGHTS, but not from strikethrough! Cannot change FONT colour either.
This comment was minimized by the moderator on the site
Thanks! This was a massive help, I should have turned to you straight away instead of battling on for hours!
This comment was minimized by the moderator on the site
What I need is a way to use 2 different passwords on a shared worksheet. I need to be able to lock my formulas and then when someone puts in the data they need to lock and protect with another password. Is this possible?
This comment was minimized by the moderator on the site
asdlkfjsdlk alsdkjflas fka klsdlfkjasdl adjlasdfkj lasdf
This comment was minimized by the moderator on the site
si want to freez the formula in one sheet of the book , like daly am receiving the files day wise as summry-15 & summry-16, i need certain summry so i made summry in one sheet (in the same book) using vlookup & hlookup ,but when am pasting the formula in summry-16 formula is taking the data from suury15 only i need formula has to take from the current book only(which my summry sheet part of the book).
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations