View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Carlos Nunes-Ueno Carlos Nunes-Ueno is offline
external usenet poster
 
Posts: 2
Default Speeding up slow code

Hi Jim,

Thanks for the reply and the link to the etiquette guide. I've been crazy
busy so I just finally got to check the group again. That and the news
server I had been using refused to show the post for days.

I tried your modified code (including changing the integers to longs) and it
definitely was faster. Running about 3300 rows took about two minutes this
time, and last time it would have been around five or so. I still wouldn't
cherish running 50,000 rows or anything like that but this is definitely an
improvement.

Just one more general question, is it usually faster to use a range object
than the .cells property of the worksheet for grabbing rows like this?

Thanks,

Carlos

"Jim Cone" wrote in message
...
Try the code below.
I have added the rngRow variable (it eliminates some dots).
You should change the row variable declarations from Integer to Long.
I have no way of testing it so please provide some feedback.
Also, some helpful posting tips here...
http://www.cpearson.com/excel/newposte.htm