![]() |
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 |
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 |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 05:41 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com