I'm looking to improve the following macro->
Managers are using this to hide everyone that they don't have responsibility for. Unfortunely there isn't a common criteria between his people, so they run this to hide the rows that doesn't have their people on them.
J column contains their names. There are approx 25 people that report to him and sometimes over 500 others on the same spreadsheet.
Columns A - J K L -etc.
WO# NAME HRS STATUS
1542 JON 2.0 CLOSE
1586 BOB 4.2 COMP
1693 DAN 8.0 OPEN
1699 AL 3.0 INP
Any improvements would help.
tav
Managers are using this to hide everyone that they don't have responsibility for. Unfortunely there isn't a common criteria between his people, so they run this to hide the rows that doesn't have their people on them.
J column contains their names. There are approx 25 people that report to him and sometimes over 500 others on the same spreadsheet.
Columns A - J K L -etc.
WO# NAME HRS STATUS
1542 JON 2.0 CLOSE
1586 BOB 4.2 COMP
1693 DAN 8.0 OPEN
1699 AL 3.0 INP
Code:
Sub HidePeople()
Dim X As Integer
For X = 1 To 200
If Cells(X, 10).Value <> "JON" And Cells(X, 10).Value <> "DAN" And Cells(X, 10).Value <> "BOB" Then
Rows(X).Hidden = True
End If
Next X
End Sub
Any improvements would help.
tav