Protect contents in a cell from deletion

  • Thread starter Thread starter Diana
  • Start date Start date
D

Diana

I need to protect the content of a particular cell from
being deleted but I do not want to protect the whole
spreadsheet since some of the data in it needs to be
altered on daily basis. Any ideas?
Thank you!
 
I figured out what was confusing me. In my excel
application all cells are locked by default. So when I
choose a particular cell and lock it and then protect the
workbook all of the cells are locked. So I had to unlock
the whole workbook and then lock all the cells I need
to... I can't believe I didn't figure this out earlier...
 
Could you please tell me how you did that? I need to lock
the column headings so noone can change the label when
entering into a form . Thanks for any input. I was having
the same problem.
 
I hope this would help out:

First I would select the whole sheet and then go to
FORMAT, CELLS, PROTECTION and unselect Locked and Hidden.

Then, Select the cells that you would like to lock for
editting and repead the same step as above but this time
choose Locked. Then go to TOOLS, PROTECTION, Protect
Sheet.

There is another way I would lock the cells. If they are
text (as in your case) then I would use the validation
option and specify some weird numbered range, and this
way no one can really change them. ( I used DATA,
VALIDATION, NUmber range)...
 
There is a more sofisticated way, see also my reply to
the posted item above (Run Macro when contents of cell
change).

If you use the example code I put there and where it
says ' put your code here ... put Range("xx").Select
(make sure xx refers to the next cell in the tab-order),
then whenever the cell you want to protect (in this
example A1) is selected the macro will select the next
cell. Impossible to select the cell and change it like
that.
 
Back
Top