Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Creating conditional format to protect cells

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional format for cells. Robin Chapple New Users to Excel 5 January 30th 07 07:01 PM
Conditional Format based on Other Cells Fletch Excel Discussion (Misc queries) 2 October 10th 06 02:03 PM
Conditional Format based on 3 other cells. Dtown Dawg Excel Discussion (Misc queries) 2 September 11th 06 10:39 PM
Copying a conditional format to several cells 67 chevytruc Excel Discussion (Misc queries) 2 May 20th 06 07:51 AM
Creating a conditional format for a cell based on another cell's v steve-o Excel Discussion (Misc queries) 2 October 26th 05 03:51 PM


All times are GMT +1. The time now is 03:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"