LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Quick Search Loop


Hi All,

I am trying to write a loop (which is part of a larger macro) that
searches a worksheet and deletes the rows which contains the search
text.

Do
Cells.Find(What:="Vendor Item", After:=ActiveCell,
LookIn:=xlFormulas _
, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
'if activecell does contain "Vendor Item" then
Range(ActiveCell.Offset(0, 0), ActiveCell.Offset(1,
0)).Delete Shift:=xlUp
ActiveCell.Offset(1, 0).Activate
'end if
Loop Until IsEmpty(ActiveCell)

It does this successfully until there are no more of the search strings
in the document, then it starts deleting any rows. (There is more data
on the row which has vendor item). I realise i could put coding in, but
I dont know how to proceed. Please help

Thank you


--
Sami82
------------------------------------------------------------------------
Sami82's Profile: http://www.excelforum.com/member.php...o&userid=27111
View this thread: http://www.excelforum.com/showthread...hreadid=482114

 
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
Do Loop or use End iF for search string RGreen Excel Discussion (Misc queries) 4 September 1st 09 12:59 AM
Quick search required cashman Excel Discussion (Misc queries) 2 September 10th 06 03:19 PM
suggest new users try quick search above 1st may help nastech Excel Discussion (Misc queries) 0 April 27th 06 04:44 PM
how do i loop in a access search hans[_2_] Excel Programming 3 July 28th 03 09:35 AM
search & copy with loop Don Guillett[_4_] Excel Programming 0 July 24th 03 02:55 PM


All times are GMT +1. The time now is 01:56 PM.

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

About Us

"It's about Microsoft Excel"