提示:其他語言是Google翻譯的。 你可以訪問 English 版本。
登入
x
or
x
x
註冊
x

or

如何鎖定和保護Excel中的公式?

在創建工作表時,有時需要使用某些公式,而不希望其他用戶更改,編輯或刪除公式。 防止用戶使用公式的最簡單和最常用的方法是鎖定和保護工作表中包含公式的單元格。 請去鎖定和保護公式如下:

使用格式化單元格和保護工作表功能來鎖定和保護公式

使用工作表設計鎖定和保護公式 好idea3

Office選項卡在Office中啟用選項卡式編輯和瀏覽,使您的工作更輕鬆......
Kutools for Excel解決了您的大多數問題,並使您的生產率提高了80%
  • 重用任何東西: 將最常用或最複雜的公式,圖表和其他任何內容添加到您的收藏夾中,並在將來快速重複使用它們。
  • 超過20文本功能: 從文本字符串中提取數字; 提取或刪除部分文字; 將數字和貨幣轉換為英文單詞。
  • 合併工具:將多個工作簿和工作表合二為一; 合併多個單元格/行/列,而不會丟失數據; 合併重複的行和總和。
  • 拆分工具:根據價值將數據分割成多個工作表; 一本工作簿可轉換為多個Excel,PDF或CSV文件; 一列到多列。
  • 粘貼跳過 隱藏/過濾行; 數和總和 按背景顏色; 將個性化電子郵件批量發送給多個收件人。
  • 超級過濾器: 創建高級過濾方案並應用於任何工作表; 分類 按週,日,頻率等; 過濾 通過大膽,公式,評論......
  • 超過300強大的功能; 與Office 2007-2019和365一起使用; 支持所有語言; 在您的企業或組織中輕鬆部署。

箭頭藍色右泡 使用格式化單元格和保護工作表功能來鎖定和保護公式

默認情況下,工作表上的所有單元格都被鎖定,所以您必須先解鎖所有單元格。

1。 選擇整個工作表 按Ctrl + A,然後點擊右鍵,選擇 單元格格式 從上下文菜單。

2。 和一個 單元格格式 對話框會彈出。 點擊 保護,並取消選中 鎖定 選項。 點擊 OK。 整個工作表已被解鎖。

文檔保護,formulas1

3。 然後點擊 主頁 > 查找和選擇 > 去特別, 去特別 對話框將會出現。 檢查 公式 低至 選擇 選項,然後單擊 OK。 看截圖:

文檔保護,formulas2

4。 所有包含公式的單元格將被選中。

5。 然後去鎖定選擇的單元格。 右鍵單擊所選單元格,然後選擇 單元格格式 從上下文菜單,和一個 單元格格式 對話框將會顯示。 點擊 保護, 檢查 鎖定 複選框。 看截圖:
文檔保護,formulas3

6。 然後點擊 回顧 > 保護工作表保護工作表 對話框會彈出,您可以在中輸入密碼 密碼解除表單保護 框。 看截圖:

文檔保護,formulas4

7。 然後點擊 OK。 另一個 確認密碼 對話框將會出現。 重新輸入您的密碼。 然後點擊 OK.

文檔保護,formulas5

然後包含公式的所有單元格都被鎖定和保護。 在這種情況下,您不能修改公式,但可以編輯其他單元格。


箭頭藍色右泡 使用工作表設計鎖定和保護公式

如果你已經安裝 Kutools for Excel,您可以使用快速鎖定和保護配方 工作表設計 效用。
Kutools for Excel, 與以上 300 方便的功能,讓您的工作更輕鬆。

安裝後 Kutools for Excel,請按照以下步驟操作:(免費下載Kutools for Excel!)

1。 點擊 企業 > 工作表設計 使之成為可能 設計 組。 看截圖:

doc保護公式1

doc箭頭

doc保護公式2

2。 然後點擊 突出顯示公式 突出顯示所有公式單元格。 看截圖:
doc保護公式3

3.選擇所有突出顯示的單元格並單擊 選擇鎖定 鎖定公式。 彈出一個對話框提醒您,只有在保護表格之後才能鎖定公式。 查看截圖:

doc保護公式4doc保護公式5

4。 現在點擊 保護工作表 鍵入密碼以保護表單。 查看屏幕截圖:
doc保護公式6

備註

1。 現在公式被鎖定和保護,您可以點擊 關閉設計 禁用 設計 標籤。

2。 如果你想取消保護工作表,你只需要點擊 工作表設計 > 取消保護表.

在“工作表設計”組中,您可以突出顯示解鎖單元格,名稱範圍等。


選項卡式瀏覽和編輯多個Excel工作簿/ Word文檔,如Firefox,Chrome,Internet瀏覽10!

您可能熟悉在Firefox / Chrome / IE中查看多個網頁,並通過輕鬆單擊相應的選項卡在它們之間切換。 此處,Office選項卡支持類似的處理,允許您在一個Excel窗口或Word窗口中瀏覽多個Excel工作簿或Word文檔,並通過單擊其選項卡輕鬆切換它們。 單擊免費獲得Office Tab的30天試用!

擅長

Kutools for Excel解決了您的大多數問題,並使您的生產率提高了80%

  • 重用: 快速插入 複雜的公式,圖表 以及你以前用過的任何東西; 加密單元格 密碼; 創建郵件列表 並發送電子郵件...
  • 超級方程式酒吧 (輕鬆編輯多行文字和公式); 閱讀佈局 (輕鬆讀取和編輯大量單元格); 粘貼到過濾範圍...
  • 合併單元格/行/列 不丟失數據; 分裂細胞含量; 組合重複的行/列...防止重複的細胞; 比較範圍...
  • 選擇複製或唯一 行; 選擇空行 (所有細胞都是空的); 超級查找和模糊查找 在許多工作簿中; 隨機選擇......
  • 精確複製 多個單元格而不更改公式參考; 自動創建參考 多張表; 插入項目符號,複選框等等......
  • 提取文本,添加文本,按位置刪除, 刪除空間; 創建和打印分頁小計; 在單元格內容和註釋之間轉換...
  • 超級過濾器 (將過濾方案保存並應用到其他工作表); 高級排序 按月/週/日,頻率等; 特殊過濾器 用粗體,斜體......
  • 結合工作簿和工作表; 根據鍵列合併表; 將數據拆分為多個表格; 批量轉換xls,xlsx和PDF...
  • 超過300強大的功能。 支持Office / Excel 2007-2019和365。 支持所有語言。 在您的企業或組織中輕鬆部署。 全功能30天免費試用。
kte tab 201905

Office選項卡為Office提供選項卡式界面,使您的工作更輕鬆

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,Publisher,Access,Visio和Project。
  • 在同一窗口的新選項卡中打開並創建多個文檔,而不是在新窗口中。
  • 通過50%提高您的工作效率,每天為您減少數百次鼠標點擊!
官方底部
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 · 4 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 · 5 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 · 6 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 ?