Hiding rows with locked cells

February 1, 2011 at 22:02:24
Specs: Windows Vista
I am using the below macro to hide rows when a cell is o or blank and it works fine the only thing is that when the row has locked cells it wont let this run. Is there a way to hide these rows when there is a locked cell or 2 in it? Also I have to run this manualy to have it update if the cell changes value is there a way that it will monitor that cell and unhide or hide automaticaly based on the cell value?

Any helpl would be great


Sub HideRows()
Dim cell As Range
For Each cell In Range("G8:G53,G55:G63")
If (cell.Value) < "0" Then
cell.EntireRow.Hidden = True
ElseIf cell.Value > "0" Then
cell.EntireRow.Hidden = False
End If
End Sub

See More: Hiding rows with locked cells

Report •

February 2, 2011 at 05:42:32
I figured out the locked cell problem with activesheet.unprotect the protect just need help with the auto

Report •
Related Solutions

Ask Question