Sub CPS()
Application.ScreenUpdating = False
i = 1
Columns("C:IV").Hidden = False
If Range("B23") = "All" And _
Range("B24") = "All" And _
Range("B25") = "All" And _
Range("B26") = "All" And _
Range("B27") = "All" And _
Range("B28") = "All" And _
Range("B29") = "All" And _
Range("B29") = "All" And _
Range("B32") = "All" Then Exit Sub
Do While Range("A1").Offset(22, i) > 0
Range("A1").Offset(22, i).Select
If Selection.Value <> Range("B23").Value Then
If Selection.Offset(2, 0) <> Range("B25").Value Then
If Selection.Offset(3, 0) <> Range("B26").Value Then
If Selection.Offset(4, 0) <> Range("B27").Value Then
If Selection.Offset(6, 0) <> Range("B29").Value Then
If Selection.Offset(7, 0) <> Range("B30").Value Then
If Selection.Offset(9, 0) <> Range("B32").Value Then ActiveCell.EntireColumn.Hidden = True
End If
End If
End If
End If
End If
End If
i = i + 1
Loop
Application.ScreenUpdating = True
End Sub
Bookmarks