数据验证单元格锁如果值为true(Google Spreadsheet) [英] Data Validation cell lock if value is true (Google Spreadsheet)

查看:368
本文介绍了数据验证单元格锁如果值为true(Google Spreadsheet)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我现在正在Google电子表格中创建数据验证,我想锁定某个基于另一个电子表格中另一个单元格的值。

场景:(根据图像)

有两个不同的电子表格(Sample1& Sample 2),它们具有相同的列H,其状态和相同的单元格H2是下拉列表(活动和非活动)。



在Sample1单元H2上,如果我选择Inactive,我想锁定Sample2单元H2,否则如果在Sample1单元H2上如果我选择Active,那么Sample2单元H2应该保持为下拉列表。



在此先感谢。

解决方案

我假设您不想将单元格锁定为保护它。

您无法删除数据验证b你可以给它一个空集。



最简单的方法是添加一个 Control 表单处理这个。

这个应用程序可能有点矫枉过正,但是你可以用这种方式创建适当的交互式菜单,这些菜单比较复杂并且在依赖关系上包含更多的选项,独立方。


  ____A_________B_________C____ 
1 |活动|非活动|当前|
2 |活动| | |
3 |非活动| | |

随着单元格C2获取公式

 = INDEX(A2:B3,MATCH(Sample1!H2,A1:B1,0))

并且在 Sample2!H2 中引用 Control!C2:C3

I am currently working now on creating data validation in google spreadsheet, and I want to lock a certain cell based on the value of the other cell in another spreadsheet.

Scenario: (Based on the Image)

There are 2 different spreadsheets (Sample1 & Sample 2) with has the same column H which is Status and the same Cell H2 which is Dropdown list (Active and Inactive).

on Sample1 Cell H2, If I choose Inactive, I want the Sample2 Cell H2 to be locked, otherwise if on Sample1 Cell H2 If I choose Active, the Sample2 Cell H2 should be remain as dropdown list.

Thanks in advance.

解决方案

I assume you don't want to lock the cell as in protecting it.
You can't remove the data validation but you can give it an empty set.

The easiest approach for this kind of thing is to add a Control sheet that handles this.
It may be a bit overkill for this application but you could create proper interactive menus in this fashion that are more complex and contain more options on the dependent and the independent side.

  ____A_________B_________C____
1|   Active| Inactive| Current|       
2|   Active|         |        |
3| Inactive|         |        |

With cell C2 getting the formula

=INDEX(A2:B3, , MATCH(Sample1!H2, A1:B1, 0))

And the Data validation in Sample2!H2 referring to Control!C2:C3

这篇关于数据验证单元格锁如果值为true(Google Spreadsheet)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆