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.
With cell C2 getting the formula
And the Data validation in
Sample2!H2
referring toControl!C2:C3