[转]Excel - How to lock cell without using macros if possible
本文转自: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 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 test to the value =IF(Sheet1!$A$1=1,"",Sheet1!$E$1:$E$5)
this means that if A1 is 1, I get nothing, and if A1 is anything else I get E1:E5
Then I set the data validation to List, with source to =test you 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
[转]Excel - How to lock cell without using macros if possible的更多相关文章
- Java的poi技术遍历Excel时进行空Cell,空row,判断
/** * 导入信息 */ @Override public List<Object> add(HttpServletRequest request) { // TODO Auto-gen ...
- Java poi读取,写入Excel,处理row和cell可能为空的情况
首先需要导入包 import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.poifs.filesystem.NP ...
- 用 Excel 测试“绘制两点间连线”的算法
最近在研究和制作数字示波器,其中涉及一个小算法:需要将 ADC 采样的数值在 TFT LCD 屏幕上面显示并且用“线”连接起来. ADC 按照时序对输入电压采样后,记录的是一个个的数值,如果显示的时候 ...
- Openxml入门---Openxm读取Excel数据
Openxml读取Excel数据: 有些问题,如果当Cell 里面是 日期和浮点型的话,对应的Cell.DataType==Null,对应的时间会转换为一个浮点型,对于这块可以通过DateTime.F ...
- SoapUI Pro Project Solution Collection-DataSource(jdbc,excel)
here give a solution for excel file change the excel configuration these: Set Excel file path in cur ...
- Ruby操作Excel的方法与技巧大全
测试工作中,批量的数据通常会放到excel表格中,测试输出的数据写回表格中,这样输入输出易于管理,同时清晰明了 使用ruby来操作excel文件首先需要在脚本里包含以下语句 require'win32 ...
- 使用POI来实现对Excel的读写操作
事实上我感觉直接贴代码就好了.代码里面差点儿做到每一行一个凝视.应该看起来会比較简单 代码托管在github上:https://github.com/chsj1/ExcelUtils package ...
- 写20万数据到Excel只需9秒
on my god,写20万数据到Excel只需9秒 还是菜鸟时,在某个.Net项目中,用户需要从业务系统导出Report,而数据量通常都在上万条以上,最初采用的方式就是在服务器端用NPOI生成E ...
- 通过Excel认识POI
1.POI是什么 Apache POI - the Java API for Microsoft Documents,顾名思义,Apache的三方包,用来操作微软office文档的,多数时候用来操作e ...
随机推荐
- 重新想象 Windows 8 Store Apps (45) - 多线程之异步编程: IAsyncAction, IAsyncOperation, IAsyncActionWithProgress, IAsyncOperationWithProgress
[源码下载] 重新想象 Windows 8 Store Apps (45) - 多线程之异步编程: IAsyncAction, IAsyncOperation, IAsyncActionWithPro ...
- Json Utils
import java.util.List;import java.util.Map; import net.sf.json.JSONArray;import net.sf.json.JSONObje ...
- python flask应用部署
失败版本:flask+uwsgi ini配置文件 [uwsgi] callable = app ;//程序内启用的application变量名 home = /home/jcuan/code/pyth ...
- 【FFmpeg】ffplay播放rtsp视频流花屏问题
问题描述:ffplay播放rtsp视频流时,播放过程中随机出现花屏现象. 基本流程学习:阅读ffplay源码,熟悉其播放rtsp视频流的基本流程. 在ffplay源码阅读和分析的基础上,画出了其播放r ...
- mysql init-file参数中语句限制
mysql 启动选项中的init-file文件的内容目测只能是dml语句,不能包含ddl,否则执行就会报错,但不影响启动本身..太扯了..
- handler机制的原理(转)
Handler概述 andriod提供了Handler 和 Looper 来满足线程间的通信.Handler先进先出原则.Looper类用来管理特定线程内对象之间的消息交换(MessageEx ...
- wap网站safari浏览器和微信cooke不能登录问题
wap网站safari浏览器cooke不能登录问题: http://wenku.baidu.com/link?url=VnPxl43PySYVygt09vkQ7xwxOD0JCXNtw3Fx7100j ...
- mac下用ruby安装sass && webstorm下给scss文件添加watch
1.安装rvm 先安装 [Xcode](http://developer.apple.com/xcode/) 开发工具,它将帮你安装好 Unix 环境需要的开发包 sudo curl -L https ...
- 更换SAP主界面右边区域背景主题
1) Tcode:SMW0(注意,最后面是零,不是英文字母O),选择第二个单选按钮 2)点击回车后,直接点击运行按钮. 3)在SAP WEB 资源库:对象显示 页面,点击:新建 4)创建对象名称,名 ...
- SharePoint部署工具SPSD
SharePoint Solution Deployer,绝对属于必备的SharePoint工具之一了. 下载,解压这个工具,会有如下的目录(没有Assemblies和DeployGAC.bat)解压 ...