Forum Discussion
Data Validation to lock a cell based on value in another cell.
Jrhodes303 I have the same issue; adding a comment to follow the responses. I have a cell that I want to be locked from editing IF another cell has a value that starts with a certain prefix.
- HansVogelaarJun 13, 2024MVP
Use a formula such as =LEFT(E2, 2)<>"AB" and clear the check box "Ignore blank" in the Data Validation dialog (see previous reply)
- asmith40Jun 13, 2024Copper Contributor
Thank you! I am trying to follow your formula. If Column 1 value starts with "B", then Column 3 should allow a change. Can you see something I am doing wrong?
C2 stops me from changing the value because A2 value does not start with "B" (Pass)
C3 allows a change because A3 value starts with "B" (Pass)
C4 allows a change but A4 does not start with "B" (Fail)
- HansVogelaarJun 13, 2024MVP
If you select the entire column C when creating the data validation rule, change the formula to
=LEFT(A1)="B"
since C1 is the active cell, and since you want to be able to enter a value if column A begins with "B".