AutoCalculation Question

dturgel

Board Regular
Joined
Aug 6, 2015
Messages
58
I'm having a tough time speeding up a macro that runs through a very long sequence of steps. What's strange is when I switch excel to manual calculation, it flies through the macro in 4-5 seconds but when I switch the code to reflect this (i.e. put in xlCalculationManual in the first line of the code and xlCalculationAutomatic in the last line of the code) it is still really slow - does anyone know if it makes a difference where I put these commands in the code? Should I put them in multiple places within the code? Any ideas are greatly appreciated.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Hi dturgel

This should go at the very top: Application.Calculation = xlCalculationManual
This should go at the very bottom: Application.Calculation = xlCalculationAutomatic

If you are using nested subroutines, one of them may turn the calculation back to automatic before it comes back to the calling SUB. You'll need to look for that. I use them all the time and it works like you want.

Jeff
 
Upvote 0
Jeff,

Yes, I am using nested subroutines - I will turn them off in them and let you know how it goes - thanks so much for your advice!

Daniel
 
Upvote 0

Forum statistics

Threads
1,214,614
Messages
6,120,517
Members
448,968
Latest member
Ajax40

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