Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 149
Default highlight locked cells

I just inherited a very large legacy spreadsheet that has a good bit of
locked cells throughout. Is there a way to maybe iterate through a page and
highlight or other formating of just cells that are locked?

It's very time-consuming to manually check a lot of cells to see if they
have been locked.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default highlight locked cells

here's a simple way, you can change bold to a color if you want

Sub locked_cells()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange
If cell.Locked = True Then
cell.Font.Bold = True
Else
cell.Font.Bold = False
End If
Next

End Sub

--


Gary


"scott" wrote in message
...
I just inherited a very large legacy spreadsheet that has a good bit of locked
cells throughout. Is there a way to maybe iterate through a page and highlight
or other formating of just cells that are locked?

It's very time-consuming to manually check a lot of cells to see if they have
been locked.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default highlight locked cells

Are you using Format|Conditional Formatting for anything?

If no, then how about using it to show the locked/unlocked cells?

Select your range (ctrl-A for all the cells).
Format|Conditional formatting
formula is: =CELL("protect",A1)

(Use the activecell's address instead of A1.)

Give it a nice pattern.

scott wrote:

I just inherited a very large legacy spreadsheet that has a good bit of
locked cells throughout. Is there a way to maybe iterate through a page and
highlight or other formating of just cells that are locked?

It's very time-consuming to manually check a lot of cells to see if they
have been locked.


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 149
Default highlight locked cells

That's smart. I was looking for a non-distructive method like that.


"Dave Peterson" wrote in message
...
Are you using Format|Conditional Formatting for anything?

If no, then how about using it to show the locked/unlocked cells?

Select your range (ctrl-A for all the cells).
Format|Conditional formatting
formula is: =CELL("protect",A1)

(Use the activecell's address instead of A1.)

Give it a nice pattern.

scott wrote:

I just inherited a very large legacy spreadsheet that has a good bit of
locked cells throughout. Is there a way to maybe iterate through a page
and
highlight or other formating of just cells that are locked?

It's very time-consuming to manually check a lot of cells to see if they
have been locked.


--

Dave Peterson



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default highlight locked cells

By default all cells on the sheet are locked, locked status is only relevant
if the sheet is protected. If the sheet is protected you may (depending on
protect options) need to unprotect before trying Gary's or Dave's
suggestions. If that's not possible you could loop through cells checking if
Not .Locked and apply some format to the unlocked cells.

Regards,
Peter T

"scott" wrote in message
...
I just inherited a very large legacy spreadsheet that has a good bit of
locked cells throughout. Is there a way to maybe iterate through a page

and
highlight or other formating of just cells that are locked?

It's very time-consuming to manually check a lot of cells to see if they
have been locked.






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
Can you highlight locked cells in excell, so you can check i Tony Excel Discussion (Misc queries) 7 July 26th 09 10:02 PM
Locked worksheet & hyperlinks (w/ select locked cells unchecked) dgold82 Excel Discussion (Misc queries) 1 July 10th 09 09:42 PM
Cells - highlight - locked up Shanny Excel Discussion (Misc queries) 1 December 21st 07 05:42 PM
Put comments on a locked spreadsheet even though cells not locked RDP Excel Worksheet Functions 1 September 11th 05 11:59 PM
worksheet is locked on highlight how do I unlock it jorge parde Excel Worksheet Functions 1 August 30th 05 03:30 PM


All times are GMT +1. The time now is 12:17 AM.

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

About Us

"It's about Microsoft Excel"