Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default VB code Required-------!

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Another VB Code Required TGV Excel Discussion (Misc queries) 7 February 7th 09 07:21 AM
VB Code Required TGV Excel Discussion (Misc queries) 3 February 6th 09 05:31 PM
help required in completing the code deepika :excel help[_2_] Excel Discussion (Misc queries) 0 February 26th 08 09:15 AM
Code help required peter.thompson[_33_] Excel Programming 4 January 10th 06 04:25 AM
Code required please Neal Excel Programming 2 January 24th 05 05:27 AM


All times are GMT +1. The time now is 02:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"