View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Newb: Asking about a tweak in code

Hi,

Am Mon, 26 Nov 2012 11:56:35 -0800 (PST) schrieb :

For Lrow = Lastrow To Firstrow Step -1

'We check the values in the A column in this example
With .Cells(Lrow, "A")

If Not IsError(.Value) Then

If .Value = "ron" Then .EntireRow.Delete
'This will delete each row with the Value "ron"
'in Column A, case sensitive.

End If

End With

Next Lrow


change the code above to:

For Lrow = Lastrow To Firstrow Step -1
With .Cells(Lrow, "A")
If InStr(LCase(.Value), "ron") Then .EntireRow.Delete
End With
Next Lrow


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2