Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
conditional formatting
for a particular worksheet, if a cell is locked, i want it to be filled in
with a color. How can this be accomplished? Thank you, Steve |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
conditional formatting
I presume you mean the cell has become locked by a macro?
Here are some examples to include in the macro: If Range("B2").Locked Then Range("B2").Interior.Color = vbYellow If Cells(3, 3).Locked Then Cells(3, 3).Interior.Color = vbGreen Dim Cell As Range For Each Cell In Range("A1:J6") If Cell.Locked Then Cell.Interior.Color = RGB(150, 180, 220) Next Cell "steve" wrote: for a particular worksheet, if a cell is locked, i want it to be filled in with a color. How can this be accomplished? Thank you, Steve |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
conditional formatting
Select the entire worksheet by clicking the empty area where the row and
column headers meet in the top left of the workspace Use Format|Conditional Format and in the ensuing dialog box use: Formula is =CELL("protect",A1)=1 Of course this must be done before protection is switched on! best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "steve" wrote in message ... for a particular worksheet, if a cell is locked, i want it to be filled in with a color. How can this be accomplished? Thank you, Steve |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
conditional formatting
Activesheet.Unprotect
for each cell in activesheet.usedrange if cell.locked then cell.interior.colorIndex = 3 Next Activesheet.Protect -- Regards, Tom Ogilvy "steve" wrote in message ... for a particular worksheet, if a cell is locked, i want it to be filled in with a color. How can this be accomplished? Thank you, Steve |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
conditional formatting
Forgot to add:
Use Format|Conditional Format and in the ensuing dialog box use: Formula is =CELL("protect",A1)=1 ****** and set the colour needed****** -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "Bernard Liengme" wrote in message ... Select the entire worksheet by clicking the empty area where the row and column headers meet in the top left of the workspace Use Format|Conditional Format and in the ensuing dialog box use: Formula is =CELL("protect",A1)=1 Of course this must be done before protection is switched on! best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "steve" wrote in message ... for a particular worksheet, if a cell is locked, i want it to be filled in with a color. How can this be accomplished? Thank you, Steve |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
conditional formatting
you guys rock
"Bernard Liengme" wrote: Forgot to add: Use Format|Conditional Format and in the ensuing dialog box use: Formula is =CELL("protect",A1)=1 ****** and set the colour needed****** -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "Bernard Liengme" wrote in message ... Select the entire worksheet by clicking the empty area where the row and column headers meet in the top left of the workspace Use Format|Conditional Format and in the ensuing dialog box use: Formula is =CELL("protect",A1)=1 Of course this must be done before protection is switched on! best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "steve" wrote in message ... for a particular worksheet, if a cell is locked, i want it to be filled in with a color. How can this be accomplished? Thank you, Steve |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I convert conditional formatting into explicit formatting? | Excel Discussion (Misc queries) | |||
Conditional formatting--different formatting depending on cell con | Excel Discussion (Misc queries) | |||
Formatting Conditional Formatting Icon Sets | Excel Discussion (Misc queries) | |||
Protect Cell Formatting including Conditional Formatting | Excel Discussion (Misc queries) | |||
Conditional Formatting that will display conditional data | Excel Worksheet Functions |