View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.newusers
SteveW SteveW is offline
external usenet poster
 
Posts: 427
Default Adding a loop to conditional delete code

Good point, I remember something about that now.
Steve

On Tue, 15 Aug 2006 14:51:43 +0100, Bernie Deitrick <deitbe consumer dot
org wrote:

You should note that if you have consecutive cells with a value greater
than 16, the second cell's
row will not be deleted using this method.

The prefered step through method is to start at the bottom and work up..

For myRow = 10000 to 2 Step - 1
If Cells(myRow,6).Value = 16 Then
Cells(myRow,6).EntireRow.Delete
Next myRow

Still slower than sorting first, but it will get all the values, unlike
the first method.

HTH,
Bernie
MS Excel MVP


"maw via OfficeKB.com" <u12713@uwe wrote in message
news:64ce9464e110e@uwe...
Thanks Steve,

I did make that little amendment to yours and it works fine :-)

Thanks again guys

Mark

--
www familyfund org uk

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...l-new/200608/1






--
Steve (3)