Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Excel 2010 is it possible to lock or disable editing of one or more cells based on the value set in another cell.

My idea was to have a drop down list in Cell 1A with, for example, locked and unlocked. Based on what was selected in the drop down list the remainder of row 1 is editable.

share|improve this question
add comment

1 Answer

This is quite possible if you use VBA. The basic idea would be to write an event handler for when the worksheet in question is modified.

In this event handler, you first need to check if the modified cell is within the range you want to lock. If it is, you should check the value of cell A1 to see if it's in a "locked state". If it is, you can then simply ignore the event.

See this reference site for some examples. You can also see this site for a list of events you may want to use.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.