disable/lock a cell based on the contents of another cell

C

Ciarán

using a formula is it possible to disable/lock another cell?

In my worksheet cell A1 can only contain "H" or "E"

If A1 = H, I do not want anybody to be able to populate B1.
 
S

Shane Devenshire

Hi,

1. You could set up Data, Validation on B1 such that =A1<>"H" would be your
Custom formula.
2. The second alternative is to add a Worksheet_Change macro that would
store the value of B1 and if that cell were changed when A1 = H the macro
would return the original value to B1, replacing the users entry.

Of course neither of these are fool proof since the user could change A1 to
E, then modify B1 and finally set A1 back to H.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top