View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Find and delete rows

Give this macro a try...

Sub ProcessDeleteMe()
Dim DM As Range
With Worksheets("Sheet1")
On Error GoTo Done
Set DM = .Columns("A").Find(What:="DeleteMe", MatchCase:=False)
Application.Intersect(.UsedRange, Range(DM, .Cells( _
.Rows.Count, "A"))).EntireRow.Delete
End With
Done:
End Sub

--
Rick (MVP - Excel)



"JRSmith" wrote in message
...
Hi and TIA. What I'm trying to accomplish is to run code that checks
column A starting at A1. Run down until it finds the word "DeleteMe" and
from that row until the end of the document delete all rows. Is that
possible? Thanks for any advice and your time.

--

Reggie