One more:
Option Explicit
Sub testme02()
Dim myRng As Range
Dim FoundCell As Range
Dim wks As Worksheet
Dim myStrings As Variant
Dim iCtr As Long
myStrings = Array("ISA") 'add more strings if you need
Set wks = ActiveSheet
With wks
Set myRng = .Range("a6:a" & .Rows.Count)
End With
For iCtr = LBound(myStrings) To UBound(myStrings)
Do
With myRng
Set FoundCell = .Cells.Find(what:=myStrings(iCtr), _
after:=.Cells(.Cells.Count), _
LookIn:=xlValues, _
lookat:=xlWhole, _
searchorder:=xlByRows, _
searchdirection:=xlNext, _
MatchCase:=False)
If FoundCell Is Nothing Then
Exit Do
Else
FoundCell.EntireRow.Delete
End If
End With
Loop
Next iCtr
End Sub
iansmigger wrote:
>
> I am looking for a macro to delete all rows in column A only that contain the
> word "ISA", starting at row 6 and ending at the bottom of the data (variable)
--
Dave Peterson
|