View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Die_Another_Day Die_Another_Day is offline
external usenet poster
 
Posts: 644
Default VB code Required-------!

Sub DeleteRows()
Dim FirstInstance As Range
Do
Set FirstInstance = Cells.Find(What:=" Problem ",
After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=False)
If Not FirstInstance Is Nothing Then
FirstInstance.EntireRow.Delete
Loop While Not FirstInstance Is Nothing
End Sub

HTH

Die_Another_Day

Thyagaraj wrote:
Dear Friends,

I Want to delete a row based on the existence of a particular data.

ie.,

If any cell in the active sheet consists " Problem " then it should
delete the entire row....!

Can any body help..?


Thanks in Advance

Regards
Thyagaraj