View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
merjet merjet is offline
external usenet poster
 
Posts: 812
Default Macro to find specific data in a cell, then delete that row on down

Sub DeleteRows()
Dim c As Range
Set c = Cells.Find(What:="ASC database on SQL Server", _
After:=Range("B1"), LookIn:=xlFormulas, LookAt:=xlPart, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)
Rows(c.Row & ":" & c.Row + 20).Delete
End Sub

Hth,
Merjet