Cookies help us deliver our services. By using our services, you agree to our use of cookies.
Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

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 installing Kutools for Excel, please do as below:(Free Download Kutools for Excel Now!)

1. Click Enterprise > Worksheet Design to enable the Design group. See screenshot:

doc protect formulas 1

doc arrow

doc protect formulas 2

2. Then click Highlight Formulas to highlight all formula cells. See screenshot:
doc protect formulas 3

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 protect formulas 4doc protect formulas 5

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

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.

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


Tabbed browsing & editing multiple Excel workbooks/Word documents as Firefox, Chrome, Internet Explore 10!

You may be familiar to view multiple webpages in Firefox/Chrome/IE, and switch between them by clicking corresponding tabs easily. Here, Office Tab supports similar processing, which allow you to browse multiple Excel workbooks or Word documents in one Excel window or Word window, and easily switch between them by clicking their tabs. Click for free trial of Office Tab!

ot excel


Recommended Productivity Tools

Office Tab

gold star1 Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.

Kutools for Excel

gold star1 Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!

gold star1 300 New Features for Excel, Make Excel Much Easy and Powerful:

  • Merge Cell/Rows/Columns without Losing Data.
  • Combine and Consolidate Multiple Sheets and Workbooks.
  • Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
  • Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,
  • More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...

Screen shot of Kutools for Excel

Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Imadi · 7 months ago
    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
  • To post as a guest, your comment is unpublished.
    Junior · 1 years ago
    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
  • To post as a guest, your comment is unpublished.
    Srikanth C · 1 years ago
    very useful good explanation thanks
  • To post as a guest, your comment is unpublished.
    Heiko · 1 years ago
    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.
  • To post as a guest, your comment is unpublished.
    Philip Hales · 1 years ago
    This locks the cell with the formula, but also is preventing changing FONT colour and Strikethrough etc?