View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Sheeloo Sheeloo is offline
external usenet poster
 
Posts: 793
Default *expression* - how to find surrounded string

Test with Instr() method...
example
Sub t()
tmp = Cells(1, 1)
If InStr("keyword", tmp) Then
Debug.Print "Found"
Else
Debug.Print "Not found"
End If
End Sub

Convert to UPPER if case does not matter...

"Saladin Andreas" wrote:

I would like to hide all rows that do not match a criteria in a specific
column. The criteria though is sometimes "hidden" in a text like
blablakeywordblabla - in this case the keyword is given and should be
identified regardless whether there is blabla around. The kleene stern method
*keyword* does not work, I tried already the following:
If Cells(x, 11).Value = "*erledigt*" Then
Cells(x, 11).EntireRow.Hidden = True
End If
Does somebody know how I could do this?
Thanks