[转]Excel - How to lock cell without using macros if possible
2015-12-22 15:52
344 查看
本文转自:http://stackoverflow.com/questions/11953214/excel-how-to-lock-cell-without-using-macros-if-possible
You can prevent a user entering new data using only
EDIT: use formula in list
Thanks to Head of Catering's comment, it is worth remembering that you can use formulas with Data Validation / List.
See his answer to another thread to see this in action: http://stackoverflow.com/a/11902463/138938
Original post
Walkthrough for Excel 2007:
Ribbon > Data > Data Validation
Authorize : Personnalized (or similar, my Excel is not in English sorry)
Enter this formula in the field:
Thus, you cannot enter a value in the cell if A1 is still empty
Got it to work, but you can only actually set the value when it works out to a dropdown
I used Name Manager to set the name
this means that if
Then I set the data validation to
When I do this, when A1 is 1, I get an empty list in my validation dropdown, and I can't change the value. If A1 is not 1, I get my list of E1:E5, and I can change the value
You can prevent a user entering new data using only
Data Validation
EDIT: use formula in list
Thanks to Head of Catering's comment, it is worth remembering that you can use formulas with Data Validation / List.
See his answer to another thread to see this in action: http://stackoverflow.com/a/11902463/138938
Original post
Walkthrough for Excel 2007:
Ribbon > Data > Data Validation
Authorize : Personnalized (or similar, my Excel is not in English sorry)
Enter this formula in the field:
=IF(A1="",FALSE,TRUE)
Thus, you cannot enter a value in the cell if A1 is still empty
Got it to work, but you can only actually set the value when it works out to a dropdown
I used Name Manager to set the name
testto the value
=IF(Sheet1!$A$1=1,"",Sheet1!$E$1:$E$5)
this means that if
A1is 1, I get nothing, and if
A1is anything else I get E1:E5
Then I set the data validation to
List, with source to
=testyou can only set the value when test returns a list
When I do this, when A1 is 1, I get an empty list in my validation dropdown, and I can't change the value. If A1 is not 1, I get my list of E1:E5, and I can change the value
相关文章推荐
- Cocos2d-x学习笔记(19)(TestCpp源代码分析-3)
- Unreal Engine4 蓝图讲解
- 全球顶级汽车品牌邮件营销设计精选
- Android编程之TabWidget选项卡用法实例分析
- iOS获取一个控件的子控件的方法
- 第四章 Controller接口控制器详解(5)
- fastboot
- ubuntu下修改hostname
- UML建模之时序图(Sequence Diagram)
- mysql order by 查询优化
- NSFileManager—基本的路径操作
- tp-上传图片,自带截取图片
- Android开发_关于中英文切换
- 1.Android入门学习
- 摘抄一些看雪坛友的经典语录
- vs2012修复问题
- Windows下安装和使用redis
- 判断一个点是否在线段上
- LayoutInflater 用法
- 用十条命令在一分钟内检查Linux服务器性能