View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default for and if statement within another for/if statement

In xl2003 and below, you'll be processing 64k rows. In xl2007, you'll be doing
a million rows.

I like to start at the bottom and find the last used row and stop processing
after that.

(see that other reply)


drdavidge wrote:

hmm.. i managed to change it to:

Code:
--------------------

'Cut out rows
Sheets("ReArranged - No Formulas").Select
For Each rng In Range("N:N")
If rng.Value = 0 And rng.Offset(0, 11).Value <= 1 Then
rng.EntireRow.Cut Destination:=Sheets("DO NOT USE").Range("A" & Sheets("DO NOT USE").Rows.Count).End(xlUp).Offset(1, 0)
End If
Next rng

--------------------

but this seems like it is taking way too long. is there a faster way to
do something similiar?

--
drdavidge
------------------------------------------------------------------------
drdavidge's Profile: http://www.excelforum.com/member.php...o&userid=36168
View this thread: http://www.excelforum.com/showthread...hreadid=561608


--

Dave Peterson