roo
01-14-2009, 04:47 AM
Hello,
I am running a script to hide rows if it equals a certian test:
Sub hideit()
For n = 3 To 10
If Cells(n, "B") = "Eng" Then
Cells(n, "B").EntireRow.Hidden = True
Else
Cells(n, "B").EntireRow.Hidden = False
End If
Next n
End Sub
So if it equals "Eng" then hide the row. I also have certian cells that contain more then one word like "Eng 1", "Eng 2", etc. How do you tell it to hide if the string contains "Eng" not just equals? I have tried searching but unable to find a solution.
Tnx
Andrew
I am running a script to hide rows if it equals a certian test:
Sub hideit()
For n = 3 To 10
If Cells(n, "B") = "Eng" Then
Cells(n, "B").EntireRow.Hidden = True
Else
Cells(n, "B").EntireRow.Hidden = False
End If
Next n
End Sub
So if it equals "Eng" then hide the row. I also have certian cells that contain more then one word like "Eng 1", "Eng 2", etc. How do you tell it to hide if the string contains "Eng" not just equals? I have tried searching but unable to find a solution.
Tnx
Andrew