Hi i am trying to sort out my code so that it will hide all rows on the sheets listed in column b that contain a z it works on Jan sheet but will not do the other sheets listed. I am new to this coding so there is probably a really basic error any help would be great also is there a way to speed up the macro as it takes a long time to complete on one sheet let alone 12 sheets maybe there is away to detect which row has been updated?
Code:
Public Sub hidden() Dim Rownum As Long, ws As Worksheet Sheets("Jan ").Select BeginRow = 7 EndRow = 250 ChkCol = 2 ActiveWindow.DisplayZeros = False Application.ScreenUpdating = False On Error Resume Next With ThisWorkbook For Each ws In .Worksheets Select Case ws.Name Case "Jan ", "Feb ", "Mar ", "Apr ", "May ", "Jun ", "Jul ", "Aug ", "Sep ", "Oct ", "Nov ", "Dec " For RowCnt = BeginRow To EndRow If Cells(RowCnt, ChkCol).Value = "z" Then Cells(RowCnt, ChkCol).EntireRow.hidden = True Else Cells(RowCnt, ChkCol).EntireRow.hidden = False End If Next RowCnt Case Else 'do nothing End Select Next ws End With Application.ScreenUpdating = True End Sub</pre>