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

Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
  • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
  • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words...
  • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum...
  • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns...
  • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Create Mailing List and Send Emails by Cell's Value...
  • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
  • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.

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 30-day trial of Office Tab!

ot excel

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
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!
officetab bottom
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 · 1 years 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 · 2 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 · 2 years ago
    very useful good explanation thanks
  • To post as a guest, your comment is unpublished.
    Heiko · 2 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 · 2 years ago
    This locks the cell with the formula, but also is preventing changing FONT colour and Strikethrough etc?
  • To post as a guest, your comment is unpublished.
    Philip Hales · 2 years ago
    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.
  • To post as a guest, your comment is unpublished.
    Lisa · 2 years ago
    Thanks! This was a massive help, I should have turned to you straight away instead of battling on for hours!
  • To post as a guest, your comment is unpublished.
    pat · 3 years ago
    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?
  • To post as a guest, your comment is unpublished.
    XZa · 3 years ago
    asdlkfjsdlk alsdkjflas fka klsdlfkjasdl adjlasdfkj lasdf
  • To post as a guest, your comment is unpublished.
    raj · 3 years ago
    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).
  • To post as a guest, your comment is unpublished.
    Amir Muzaffar · 4 years ago
    Awesome Tut
    and well explanation
    Thanks for this help
  • To post as a guest, your comment is unpublished.
    shahzada umer · 4 years ago
    i want to know about how to lock the cell in excell sheet. that nobody intrupt the specific cell figure.
  • To post as a guest, your comment is unpublished.
    accountant · 4 years ago
    Good and clear explanation
  • To post as a guest, your comment is unpublished.
    Ani · 4 years ago
    Hello I tried This But my other cells are also locked which dont have any formula
    kindly help.
  • To post as a guest, your comment is unpublished.
    Omar · 4 years ago
    Hi if i protect the formula in excel before send it by email the person who recive the email can use the sheet with formulas or not??
  • To post as a guest, your comment is unpublished.
    Natasha · 4 years ago
    In step 5, user should be selecting Locked AND Hidden in order for the formula not to show and be able to be edited by others without changing formula.
  • To post as a guest, your comment is unpublished.
    SA · 4 years ago
    Thank you very much,
    this is of great help!
  • To post as a guest, your comment is unpublished.
    Nyiko · 4 years ago
    Thank you. Finally, i got the answer
  • To post as a guest, your comment is unpublished.
    Jamie · 5 years ago
    I want to have users be able to edit column 1 and column 2 but not be able to edit anything in column 3 (the formula) yet have it add up. I would like to lock only the column with the formula. When I do this it does not allow me to edit the other cells (which the formula adds up).Please help!
  • To post as a guest, your comment is unpublished.
    Shyam Sunder Singh · 5 years ago
    Awesome description !

    Very helpful, thank you so very much!!Blessings !
  • To post as a guest, your comment is unpublished.
    measbunna · 5 years ago
    Thanks very helpful for me. :)
    Best regards
  • To post as a guest, your comment is unpublished.
    firdoush alam · 5 years ago
    Thanks..satisfied, is there any possibilities of querry through e-mail.
  • To post as a guest, your comment is unpublished.
    Clau · 5 years ago
    Very helpful, thank you so very much!!Blessings!
  • To post as a guest, your comment is unpublished.
    Yu wai · 5 years ago
    Thank a lot.
    It is convience for all.
  • To post as a guest, your comment is unpublished.
    Yu wai · 5 years ago
    Thanks a lot..
    Glad to know to lock the cells
  • To post as a guest, your comment is unpublished.
    sexy_ella · 5 years ago
    hi...thank you so much...this was HELPFUL...... :)
  • To post as a guest, your comment is unpublished.
    Nato · 5 years ago
    Dear author, thank you very much for such a useful guide.
    Please, advise if it is possible to lock the formula cells in excel so that it is possible to delete other bulk data from the file without deleting the formulas? With the method above, it is not possible to select whole data with ctrl+A and delete.

    Thank you!
  • To post as a guest, your comment is unpublished.
    Ali Khan · 5 years ago
    Thank you! it was helpful.

    Ali
  • To post as a guest, your comment is unpublished.
    Peter Fisher · 5 years ago
    Thanks very much. This was most useful.
  • To post as a guest, your comment is unpublished.
    Muhammad Tahir · 5 years ago
    It is wonderful guide, I have ever seen.
    Thanks so much for saving my hardwork.
  • To post as a guest, your comment is unpublished.
    Marty · 5 years ago
    Protect Formulas in Excel Spreadsheet
  • To post as a guest, your comment is unpublished.
    Omen · 5 years ago
    it is very usefully thanks
  • To post as a guest, your comment is unpublished.
    GG · 5 years ago
    The BEST explanation I've found to do
    This. Thank you!!
  • To post as a guest, your comment is unpublished.
    DEEPAK KHANAL · 5 years ago
    After long period i found my problem i.e. locking/protection single sell on excel. Thank you very much www.extendoffice.com
  • To post as a guest, your comment is unpublished.
    sanjaya · 5 years ago
    ;-) thank you very much... :-)
  • To post as a guest, your comment is unpublished.
    Umer · 5 years ago
    only one cell like to lock which kept the formula
  • To post as a guest, your comment is unpublished.
    raja · 5 years ago
    I want to lock the formula cell but it has use to drop and copy
  • To post as a guest, your comment is unpublished.
    vinay4125 · 5 years ago
    Hi, please help me out, i have 3 columns (Ticket Number, Site ID, Time) i need to copy Site ID and Time according to the Ticket Number from 1st Excel sheet to 2nd excel sheet

    For Example : I Have Ticket Number 425665 with Three Site ID's UW_GJ_2904 , UW_GJ_1995 , UW_GJ_0960 , So i need to copy all three site id's from 1st Excel sheet to 2nd excel sheet .... But as per vlookup only first site ID is Reflecting UW_GJ_2904 is Reflecting in all three places, which it should not(in some cases for single ticket Ex: 425771 : only one site UW_GJ_0514 will be there, it was reflecting properly, The problem is for each ticket which has more than one site ID is not reflecting properly)

    First Excel Sheet :
    Ticket Site id time
    425665 UW_GJ_2904 1/21/14 4:51 PM
    425665 UW_GJ_1995 1/21/14 4:51 PM
    425665 UW_GJ_0960 1/21/14 4:51 PM

    Second Excel Sheet:
    ticket site id time
    425665 UW_GJ_2904 1/21/14 4:51 PM
    425665 UW_GJ_2904 1/21/14 4:51 PM
    425665 UW_GJ_2904 1/21/14 4:51 PM

    if it is only one id its Reflecting properly
    First excel sheet:

    425771 UW_GJ_0514 1/21/14 7:44 PM

    Second Excel Sheet:

    425771 UW_GJ_0514 1/21/14 7:44 PM
  • To post as a guest, your comment is unpublished.
    JOSHY BOY · 5 years ago
    thanks alot it really helped
  • To post as a guest, your comment is unpublished.
    JOSHY BOY · 5 years ago
    thank you this really helped :lol:
  • To post as a guest, your comment is unpublished.
    RIJESH · 5 years ago
    :roll: NICE EXPLANATION GOOD ONE....
    • To post as a guest, your comment is unpublished.
      Howard Walker · 2 years ago
      [quote name="RIJESH"]:roll: NICE EXPLANATION GOOD ONE....[/quote]
      Well it looks good, but I have followed it at least 6 times and each time it does not lock any of my formulaes.
  • To post as a guest, your comment is unpublished.
    Karl · 5 years ago
    :-) Great that really helps. My errant pen mouse would sometimes scrape the cell box and the formula would pop up, and not knowing, sometimes I had changed it. Caused many headaches while doing banking in the totals column. thanks again.
  • To post as a guest, your comment is unpublished.
    George Coyle · 5 years ago
    Excel protection for the PC
  • To post as a guest, your comment is unpublished.
    Tyler Stein · 6 years ago
    Thank you, this was helpful!
    • To post as a guest, your comment is unpublished.
      brong · 2 years ago
      when i use formula of excel, but i do not want another people see the formula of me. so how to do it ?