View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Otto Moehrbach[_6_] Otto Moehrbach[_6_] is offline
external usenet poster
 
Posts: 201
Default Delete all rows below The word Page: 2 of 25

Do you mean that in some cell you have "Page: 2 of 25"? And it usually is
in Column V? But not always?
One way:
Sub DeleteRows()
Dim FoundCell As Range
Set FoundCell = ActiveSheet.UsedRange. _
Find(What:="Page: 2 of 25", LookAt:=xlWhole)
On Error GoTo NotFound
Range("A" & FoundCell.Row + 1, Range("A" & Rows.Count)). _
EntireRow.Delete
On Error GoTo 0
Exit Sub
NotFound:
On Error GoTo 0
MsgBox "Text not found."
End Sub
"Duncan J" wrote in message
...
Need to delete all rows below the word Page: 2 of 25.
Do to the report it could be at any row however it usually is in cell V
Need to clean up the junk in a macro I sort by part but thiers trash

below. Even tried to filter but it won't filter out.

Thanks,
DJ