View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default *expression* - how to find surrounded string

Use Like as the comparison, not =

If Cells(x, 11).Value Like "*erledigt*" Then

Though your comparison would work in certain worksheet functions...

HTH,
Bernie
MS Excel MVP


"Saladin Andreas" wrote in
message ...
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