Data Validation cell lock if value is true (Google

2019-09-17 01:56发布

enter image description here

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.

1条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-09-17 02:31

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

查看更多
登录 后发表回答