Hi. Would like some help with this.
I want rows with values B, D, I, K, R, S, or V in column E (5) to be hidden.
I want to have B, D, I, K, R, S, V in
I want rows with values B, D, I, K, R, S, or V in column E (5) to be hidden.
VBA Code:
Sub Hide_Rows_Column_5()
Dim ws As Worksheet
Application.ScreenUpdating = False
Application.Calculation = xlManual
Dim irow As Range, rngLoop As Range, lastrow As Long
For Each ws In ThisWorkbook.Worksheets
Select Case ws.Name
Case "K1", "K2", "K3", "K4", "K7"
lastrow = ws.Cells(ws.Rows.Count, "A").End(xlUp).row
Set rngLoop = ws.Range("8:" & lastrow).Rows
For Each irow In rngLoop
If irow.Cells(5) = "B" Then 'or D, I, K, R, S, V
irow.Hidden = True
End If
Next irow
Case Else
End Select
Next ws
Application.Calculation = xlAutomatic
Application.ScreenUpdating = True
End Sub
VBA Code:
If irow.Cells(5) = "B" Then