View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
mthomas[_5_] mthomas[_5_] is offline
external usenet poster
 
Posts: 1
Default Loop through rows using a wildcard.


Very close and with a little tweeking it works fine. Actually, I neede
to delete rows that were < the conditions. So, I just added th
"ELSE". Thanks again for your help and God bless!

For i = lastRow To beginRow Step -1
If LCase(Cells(i, 1).Value) Like "*bankruptcy*" Or _
LCase(Cells(i, 1).Value) Like "*cashiering*" Then
'Do Nothing
Else
Rows(i).Delete
End If
Next

--
mthoma
-----------------------------------------------------------------------
mthomas's Profile: http://www.excelforum.com/member.php...fo&userid=2564
View this thread: http://www.excelforum.com/showthread.php?threadid=39273