跳到主要内容

如何在Excel中锁定和保护公式?

创建工作表时,有时需要使用一些公式,并且您不希望其他用户更改,编辑或删除公式。 阻止人们使用公式的最简单,最常见的方法是锁定和保护工作表中包含公式的单元格。 请按以下步骤锁定和保护公式:

使用格式单元格和保护工作表功能锁定和保护公式

使用工作表设计锁定和保护公式 好主意3

箭头蓝色右气泡 使用格式单元格和保护工作表功能锁定和保护公式

默认情况下,工作表上的所有单元格均被锁定,因此您必须首先解锁所有单元格。

1.选择整个工作表 按Ctrl + A,然后单击鼠标右键,选择 单元格格式 从上下文菜单。

2.和一个 单元格格式 对话框将会弹出。 请点击 的故事,然后取消选中 锁定 选项。 点击 OK。 整个工作表已解锁。

文档保护公式1

3。 然后点击 主页 > 查找和选择 > 转到特殊, 的网络 定位条件 对话框出现。 检查一下 公式选择 选项,然后单击 OK。 看截图:

文档保护公式2

4.将选择所有包含公式的单元格。

5.然后锁定选定的单元格。 右键单击选定的单元格,然后选择 单元格格式 从上下文菜单中, 单元格格式 将显示对话框。 请点击 的故事, 检查 锁定 复选框。 看截图:
文档保护公式3

6.然后单击 进入步骤三:发送 > 保护工作表和一个 保护工作表 对话框将会弹出,您可以在 密码取消保护床单 框。 看截图:

文档保护公式4

7。 然后点击 OK。 而另一个 确认密码 对话框出现。 重新输入密码。 然后点击 OK.

文档保护公式5

然后,所有包含公式的单元格都将被锁定和保护。 在这种情况下,您不能修改公式,但是可以编辑其他单元格。


箭头蓝色右气泡 使用工作表设计锁定和保护公式

如果你已经安装 Kutools for Excel,您可以使用来快速锁定和保护公式 工作表设计 效用。
Kutools for Excel, 与超过 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 Tab 为 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