gixxer1020
asked on
Locking/Unlocking Cells Based on Value in Another Cell
I need to unlock a cell based on whether or not another cell in the first cell's row contains a specific value.
Attached is a sample workbook where I need to evaluate range C6:C23 and see if any cells in that range contains (not necessarily equal) the value in cell E3 and if it does then the cells 2 and 3 columns to the right are unlocked for editing.
I would like this code to execute when the worksheet is activated.
Thanks,
Edwin
TestPage001.xlsm
Attached is a sample workbook where I need to evaluate range C6:C23 and see if any cells in that range contains (not necessarily equal) the value in cell E3 and if it does then the cells 2 and 3 columns to the right are unlocked for editing.
I would like this code to execute when the worksheet is activated.
Thanks,
Edwin
TestPage001.xlsm
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can use a formula to validate an entry into a cell.
When the check on the other cell is verified to disable entry (Lock cell) set the validation rule such that the entry is impossible to be valid eg if numerical entry >0 AND <0, the entry can't be both so will be rejected; if text "contains 200 z's" although not impossible is unlikely.
When the check on the other cell is verified and will allow entry then you can set the validation to be anything.
Thanks
Rob H