ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Slow Program (https://www.excelbanter.com/excel-programming/407003-slow-program.html)

AD[_2_]

Slow Program
 
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



Peter T

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

Regards,
Peter T

"AD" wrote in message
...
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





Jon Peltier

Slow Program
 
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
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"AD" wrote in message
...
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




AD[_2_]

Slow Program
 
Thanks,

I'll try your suggestions

Ariel


"Jon Peltier" wrote in message
...
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
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"AD" wrote in message
...
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







All times are GMT +1. The time now is 02:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com