跳到主要內容

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

創建工作表時,有時需要使用一些公式,並且您不希望其他用戶更改,編輯或刪除公式。 阻止人們使用公式的最簡單,最常見的方法是鎖定和保護工作表中包含公式的單元格。 請按以下步驟鎖定和保護公式:

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

使用工作表設計鎖定和保護公式 好主意3

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

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

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

2.還有一個 單元格格式 對話框將會彈出。 請點擊 保護的故事,然後取消選中 鎖定 選項。 點擊 OK。 整個工作表已解鎖。

文檔保護公式1

3。 然後點擊 首頁 > 查找和選擇 > 轉到特殊, 去特別 對話框出現。 檢查一下 公式 選擇 選項,然後單擊 OK。 看截圖:

文檔保護公式2

4.將選擇所有包含公式的單元格。

5.然後鎖定選定的單元格。 右鍵單擊選定的單元格,然後選擇 單元格格式 從上下文菜單中, 單元格格式 將顯示對話框。 請點擊 保護的故事, 檢查 鎖定 複選框。 看截圖:
文檔保護公式3

6.然後單擊 回顧 > 保護工作表保護工作表 對話框將會彈出,您可以在 密碼:取消保護床單 框。 看截圖:

文檔保護公式4

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

文檔保護公式5

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


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

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

免費安裝 Kutools for Excel,請執行以下操作:

1。 點擊 Kutools 加 > 工作表設計 使之成為可能 設計 組。 看截圖:
doc保護公式1

2。 然後點擊 突出顯示公式 突出顯示所有公式單元格。 看截圖:
doc kutools設計2

3.選擇所有突出顯示的單元格,然後單擊 選擇鎖 鎖定公式。 此時會彈出一個對話框,提醒您,在保護床單之前,fomulas不能鎖定。 查看屏幕截圖:
doc kutools設計3

4.現在點擊 保護工作表 鍵入密碼來保護工作表。 查看屏幕截圖:
doc kutools設計4

備註

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

2.如果要取消保護工作表,只需單擊 工作表設計 > 取消保護表.
doc kutools設計5

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


最佳辦公生產力工具

🤖 Kutools 人工智慧助手:基於以下內容徹底改變數據分析: 智慧執行   |  生成代碼  |  建立自訂公式  |  分析數據並產生圖表  |  呼叫 Kutools 函數...
熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

產品描述


Office選項卡為Office帶來了選項卡式界面,使您的工作更加輕鬆

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