De: Myrna Larson Objet: Re: Macro to delete rows with zero values Date : lundi 4 octobre 1999 03:36 On Sun, 3 Oct 1999 20:43:20 -0400, "Venkata Krishna" wrote: >Going through each row to check the value and multiple deleting operations will take very long time if the range is big(A1 to A15 is just an example here) ; more than 10 seconds for 821 rows. Using search function with just one delete operation will do the same job within no time (less than a sec). The following code should do it. Yes, that's definitely true. I wrote the code to handle the range he gave as an example. if it's large, then reducing the number of deletions is definitely better. Another way is with autofilter: Sub deleteZerorows() 'retain only those rows where value in column A is 0 application.screenupdating = false if activesheet.autofilterMode then activesheet.cells.autofilter with range("A1").CurrentRegion .autofilter Field:=1, Criteria1:="0" .Specialcells(xlCelltypeVisible).EntireRow.delete .autofilter end with application.screenupdating = true end Sub This needs more code (and it may not be worth the effort) if an existing filter must be restored. I'm trying to remember whether deleting rows with a multiple selection works in all versions of Excel. Seems that in a previous version (5? 95?) that it didn't work. (I have all sorts of old routines that use a for/next loop to process the range an area at a time.) do you remember anything like this?