Relative Speed of Various Processes in Macros

ransomedbyfire

Board Regular
Joined
Mar 9, 2011
Messages
121
I've been researching on how to speed up a macro and have read many things like that activating a worksheet and going back and for between worksheets are slow in macros and that using arrays instead of loops can make things faster. I've also observed that, surprisingly, one of the older macros I made when I was just starting to learn VBA that activates each cell in a column to deposit data runs faster than some of my cleaner looking ones that work more "behind the scenes" to do the same type of things.

Where can I find comprehensive information on which methods are faster than others?
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
dont select sheet columns or cells. use "with.....end with" process.

e.g

workssheets("sheet1").select
range("A1").select
selection=1234

instead use
with worksheets("sheet1")
.range("A1")=1234
end with

see the dot before range("A1")
 
Upvote 0

Forum statistics

Threads
1,224,613
Messages
6,179,896
Members
452,948
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top