View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Find row and delete following rows

Sub TryNow()
Dim myC As Range
Set myC = Cells.Find("What you are looking for")
If myC Is Nothing Then
MsgBox "That wasn't found"
Else
Range(myC, myC.End(xlDown)).EntireRow.Delete
End If
End Sub

If you are looking for a number, don't use the quotes.

HTH,
Bernie
MS Excel MVP


"m stroup" wrote in message
...
I want to search for a value in a cell and delete the row that contains it
and all others below it. I am struggling with how to define that as a range.
Suggestions?
--
Teach me to fish! Thanks for the help.
Pax, M