Hi. I would like to hide rows across multiple worksheets based on cell value. I have a VBA code that works on individual sheets in my workbook, but cannot figure out the code to apply it to multiple (13 and counting) worksheets without clicking run 13 times. I have looked through a lot of threads and tried to change the data to work for my situation, but cannot figure it out. (I have a separate code to unhide all rows with 1 click. Not sure if there's a way to make unhidden cells the default). Any help would be appreciated. Here is the code I currently have:
Sub HideRows()
Application.ScreenUpdating = False
Application.Calculation = xlManual
For Each c In Range("B8:B26")
If c.Value = 0 And c.Value <> "" Then Rows(c.Row).Hidden = True
Next
Application.Calculation = xlAutomatic
Application.ScreenUpdating = True
End Sub
Sub HideRows()
Application.ScreenUpdating = False
Application.Calculation = xlManual
For Each c In Range("B8:B26")
If c.Value = 0 And c.Value <> "" Then Rows(c.Row).Hidden = True
Next
Application.Calculation = xlAutomatic
Application.ScreenUpdating = True
End Sub