Hello. I'm trying my best to write this simple code to run in all the worksheets but one. I've been searching on this forum for the answer, but can't get it correct as I keep getting error codes. Thanks for your help.
Dim Wksht As Worksheet
Dim cell As Range
For Each Wksht In ActiveWorkbook.Worksheets
If Wksht.Name <> "2012 Quarterly Summary" Then
For Each cell In Wksht.Range("B9:B50")
If (cell.Value = "" Or cell.Value = "ZZ") Then cell.EntireRow.Hidden = True
End If
Next cell
End If
Next Wksht
End Sub
Dim Wksht As Worksheet
Dim cell As Range
For Each Wksht In ActiveWorkbook.Worksheets
If Wksht.Name <> "2012 Quarterly Summary" Then
For Each cell In Wksht.Range("B9:B50")
If (cell.Value = "" Or cell.Value = "ZZ") Then cell.EntireRow.Hidden = True
End If
Next cell
End If
Next Wksht
End Sub