I need to hide a row if any of the rows 195 through 796 in column I contains any of the following words:
Mike
Sunny
Patti
Dennis, etc.
Please help!
Thank you,
az
I need to hide a row if any of the rows 195 through 796 in column I contains any of the following words:
Mike
Sunny
Patti
Dennis, etc.
Please help!
Thank you,
az
[vba]
Sub ProcessData()
Dim i As Long
Dim ary
Application.ScreenUpdating = False
ary = Array("Mike", "Sunny", "Patti", "Dennis")
For i = 796 To 195 Step -1
If Not IsError(Application.Match(Cells(i, "I").Value, ary, 0)) Then
Rows(i).Delete
End If
Next i
Application.ScreenUpdating = True
End Sub
[/vba]
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
I just want to hide the row though, not delete it...
Can you adjust the code?
thanks so much!
[vba]
Rows(i).Hidden = True
[/vba]
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber