judgejustin
Board Regular
- Joined
- Mar 3, 2014
- Messages
- 139
I need help to see if I have made this more complex than it needs to be. I need it to hide all rows that don't meet a certain criteria, code should be self explanitory. However it takes over a minute to run everytime I open this tab. Any suggestions?
Code:
Private Sub Worksheet_Activate()
With Sheets("Void List")
Dim i As Integer
For i = 2502 To 4 Step -1
Rows(i).Hidden = True
If Range("B" & i) = "VOID" Then
Rows(i).Hidden = False
If Range("B" & i) = "" Then
Rows(i).Hidden = True
If Range("B" & i) = "ACTIVE" Then
Rows(i).Hidden = True
If Range("B" & i) = "RESERVE" Then
Rows(i).Hidden = True
End If
End If
End If
End If
Next i
End With
End Sub
[/CODE}