I need to hide rows based on a cell value if blank or has a "-". I grabbed the code below online but I assume it can be improved. I do want the sheet name specified because I run this for several sheets under a global macro as well. Any help is appreciated. Thanks
Sub CLUTCH_BUILD_HIDEROWS()
Sheets("CLUTCH BUILD").Activate
Dim xRg As Range
Application.ScreenUpdating = False
For Each xRg In Range("B9:B18")
If xRg.Value = "" Or xRg.Value = "-" Then
xRg.EntireRow.Hidden = True
Else
xRg.EntireRow.Hidden = False
End If
Next xRg
Application.ScreenUpdating = True
End Sub
Sub CLUTCH_BUILD_HIDEROWS()
Sheets("CLUTCH BUILD").Activate
Dim xRg As Range
Application.ScreenUpdating = False
For Each xRg In Range("B9:B18")
If xRg.Value = "" Or xRg.Value = "-" Then
xRg.EntireRow.Hidden = True
Else
xRg.EntireRow.Hidden = False
End If
Next xRg
Application.ScreenUpdating = True
End Sub