Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How can I make the ability to edit a cell conditional based on the value of
another cell? For example if cell A1 contains the value "Yes", cell A2 can be edited. However if the value in A1 is "No", cell A2 should be locked. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This can be done in code contained in the sheet module.
You probably need the change event. The code should go through the following steps: 1. Verify that the cell (target) being changed is in column A (1) 2. Test cell.value = "Yes" 3. Unprotect worksheet 4. If cell.value = "Yes" then set A2 protection to unlocked 5. elseif cell.value = "No" then set A2 protection to locked 6. else 'code if cell not Yes or No 7 end if 8 Reprotect worksheet Post back if you need actual code... (you can get preliminary code by using the Macro Recorder.) -- steveB Remove "AYN" from email to respond "wahamler" wrote in message ... How can I make the ability to edit a cell conditional based on the value of another cell? For example if cell A1 contains the value "Yes", cell A2 can be edited. However if the value in A1 is "No", cell A2 should be locked. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Lock cells conditionally formatted in 2007 | Excel Discussion (Misc queries) | |||
conditionally lock a cell? | Excel Discussion (Misc queries) | |||
How can you lock cell conditionally | Excel Discussion (Misc queries) | |||
conditionally lock cells? | Excel Discussion (Misc queries) | |||
Lock and unlock cells conditionally depending on input in another | Excel Worksheet Functions |