View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen Per Jessen is offline
external usenet poster
 
Posts: 1,533
Default Program Speed - Arrays Searching vs. Row Searching

Hi

Maybe it could help to set calculation to manual and turn off screen
updating if it haven't been done.

Application.Screenupdating = False ' Reember to set to true again
Application.Calculation=xlManual

Regards,
Per

"CWillis" skrev i meddelelsen
...
Hello,

I have a spreadsheet with many rows and columns of data. I have a program
that searches the data line by line and performs various calculations. My
problem is that the code takes approximately 15 minutes to run due to the
number of iterations and searches. Rather than restructure the code
completely, I was wondering if initially saving the data to a large array
and
then performing the calculations and searches on the array rather than the
spreadsheet itself would reduce my calculation time. If so, this step
would
be much easier than restructuring the code.

Thank you in advance for your thoughts.

-Chris