PC Review


Reply
Thread Tools Rate Thread

Creating conditional format to protect cells

 
 
=?Utf-8?B?MjQ0Mg==?=
Guest
Posts: n/a
 
      8th Sep 2007
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.
 
Reply With Quote
 
 
 
 
Bill Kuunders
Guest
Posts: n/a
 
      9th Sep 2007
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" <(E-Mail Removed)> wrote in message
news:1C61EF28-C023-40D8-A056-(E-Mail Removed)...
>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.



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I protect a format but allow editing in cells? Custy Microsoft Excel Misc 1 20th Mar 2009 02:39 AM
Protect format and programming on cells and columns from change Scott Microsoft Excel Discussion 5 13th Sep 2008 05:08 PM
How to protect a cell with conditional format? Ruby Microsoft Excel Worksheet Functions 1 5th Aug 2008 10:32 AM
Help with creating template for users, need to protect cells, but... kbutterly@yahoo.com Microsoft Excel Programming 0 16th Jun 2005 05:08 PM
Protect table cells in Word format from hard returns =?Utf-8?B?bGFyYWxlYQ==?= Microsoft Word Document Management 3 26th Apr 2005 08:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:59 AM.