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

  • Thread starter Thread starter Ciarán
  • Start date Start date
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.
 
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.
 
Back
Top