hey acdsky
thanks for your help. Went with your suggestion, however i would also like to know how a more "sophisticated" approach would handle it.
I would have thought that a DO While Loop would be perfect for this task. ie do while Cells.Find(What:="Report",... is not false/null
FYI - Someone on another forum came up with this solution, but i couldnt get it to work.
Sub AAA()
Dim oCell As Range
Dim sAddr As String
Set oCell = Range("IV65536")
Do
Set oCell = Cells.Find(What:="Report", _
After:=oCell, _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
Debug.Print oCell.Address
If Not oCell Is Nothing Then
If oCell.Address = sAddr Then Exit Do
If sAddr = "" Then sAddr = oCell.Address
oCell.Offset(1, 0).Resize(5, 1).EntireRow.Delete Shift:=xlUp
End If
Loop While Not oCell Is Nothing
End Sub
Once again thanks for your help
|