remove contain from rows B thur J

  • Thread starter Thread starter bill boch
  • Start date Start date
Hi
try

Sub delete_Me()
Dim copyrange As Range
Lastrow = Cells(Cells.Rows.Count, "B").End(xlUp).Row
Set MyRange = Range("B1:J" & Lastrow)
For Each c In MyRange
If InStr(c, "RS") Then
If copyrange Is Nothing Then
Set copyrange = c.EntireRow
Else
Set copyrange = Union(copyrange, c.EntireRow)
End If
End If
Next
If Not copyrange Is Nothing Then
copyrange.Delete
End If
End Sub
 
Back
Top