View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bill Kuunders Bill Kuunders is offline
external usenet poster
 
Posts: 303
Default Creating conditional format to protect cells

one way.


Sub lockselect()


Sheets(1).Select
Sheets(1).Unprotect ("mypass")
Range("C1:C15").Select
Cells.Locked = True
For Each Cell In Selection
If Cell.Value = "new" Then Cell.Locked = False
Next Cell

Sheets(1).Protect ("mypass")
End Sub

You can use this macro each time the file is opened.
To make it work as a trial you have to protect the sheet first with mypass
as the password.
Range C1 to C15 need to be adjusted to suit.

Regards

--
Greetings from New Zealand

"2442" wrote in message
...
I am wanting to create a conditional format or a data validation to protect
a
cell if anything other than "New" exists in the cell, so that unless
someone
has the password to unprotect the sheet they cannot change the cell value
unless "New" already exists. I cannot figure out how to do this. If you
can
help me, please post a reply. Thank you.