Hi,

I would like to be able to lock a cell based upon another cells value. I have found some code that would do this for one cell and would also colour the locked cell, but i accidentally deleted the code...

However there was a problem with the code. I would like the code to cover a range of cells, so if any cell in column B has the value X then the corresponding cell in column A will lock and become a different colour. (e.g. B2 = X so A2 is locked, B400 = X so A400 is locked)

I would also then like it to unlock and change colour if the cell in column B changes to a different value.


Any help appreciated