Question

I have a question about computer hardware which I think I know the answer to, but I want to be sure. I have a macro script that I believe to be coded well, but how can I increase the speed at which excel processes the macro? I have a 4 GB ram. Would more ram (i.e. 32 GB) help it to run faster?

My smallest file takes 2 hours to complete the macro run.

Finally, how much time does the following command actually save (in terms of percentage)?

Application.screenupdating=False

Thank you for your help.

Was it helpful?

Solution

If you have many complicated formulas in your file - changing calculation options may help.

Change calculation to Manual (careful with that, you have to recalculate specyfic cells by macro if you need some cells to be up to date while macro is running)

excel enabling manual calculation


Enable multi-threading (Excel 2013 and future versions only)

excel 2013 multi threading


I took images from here (howtogeek.com).

I think more ram will not help, but you can see how much memory Excel is using. If you have 4GB and you have a lot of free ram when your macro is going - adding more memory will not help. Im not sure, but I think Excel is not able to use more than 2GB.


If you are using Excel 2013 you can buy faster CPU with more cores.


If your macro uses big text files, and you are seeking a lot - SSD hard drive also may help.


how much time does the following command actually save (in terms of percentage

I think not much. Why you can't just try it and see?


Consider using more powerful data processing tool, like MS Access or more powerful database engine (like SQL Server), at least for pre-processing your data.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top