Slow Program

A

AD

Hello,

I am loading a 14,000 line range into an array.

I am then looping through each element of that array, and using the find
method, am checking to see if that value is in a 40,000 line range in
another workbook.

This is running hopelessly slow, taking 30 minutes to execute.

Screenupdating and Calcuation are both off.

Any ideas would be greatly appreciated.

Thanks
Ariel
 
E

Ed Hansberry, MS-MVP/Mobile Devices

AD said:
Hello,

I am loading a 14,000 line range into an array.

I am then looping through each element of that array, and using the find
method, am checking to see if that value is in a 40,000 line range in
another workbook.

This is running hopelessly slow, taking 30 minutes to execute.

Screenupdating and Calcuation are both off.

Any ideas would be greatly appreciated.

Do you have any Paste|Picture Link objects in the workbook? Those
are always set to automatic calculation regardless of what the
Calc settings are on.
--
__________________________________________________________________________________
Ed Hansberry (Please do *NOT* email me. Post here for the benefit of all)
What is on my Pocket PC? http://www.ehansberry.com/
Microsoft MVP - Mobile Devices www.pocketpc.com
What is an MVP? -
 
P

Peter T

Post a stripped down version of your code, enough to show the each part of
your methods.

Regards,
Peter T
 
J

Jon Peltier

Try loading the 40000 line range into a second array. Depending on how you
access the cells in the range, you can greatly change the speed of the
routine. Also, you might try a binary lookup on a sorted array.

- Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top