How do I suspend auto cals in MS Excel when running a VBA module

In a VBA module I turn off auto calculations at the beginning of the code.  At the end I turn it back on, but this is problematic as when I turn it back on in the code it re-ca calculates and takes forever since I have a lot of CountIFS and SUMIFS...

Any suggestions...

I
upobDaPlayaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SterlingMcClungCommented:
It sounds like you are already doing what you are asking for.  At some point, you are going to have to calculate the sheet, and if it takes a long time doing it automatically, it will still be slow doing it manually.

You might want to look into array functions in Excel, as they are much more efficient than lots of countifs/sumifs:
http://office.microsoft.com/en-ca/excel-help/introducing-array-formulas-in-excel-HA001087290.aspx

You can turn off autocalculation in Excel options(In Excel 2010, click File, Options), under the Formulas section.  You can then perform a manual calculation by pressing F9.
0
FlysterCommented:
You can give this a try:

    With Application
        .Calculation = xlCalculationAutomatic
        .CalculateBeforeSave = False
    End With

Flyster
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
upobDaPlayaAuthor Commented:
Sterling, I took a look at arrays and it makes sense.  However, how can I utilize arrays if I have several conditions to be met prior to a sum.  For example if cell A3 has to be >0 and B3>50 prior to summing certain cells how would I replace the SUMIF with an array ?

Flyster,

In the interim I will give your suggestion a shot.
0
upobDaPlayaAuthor Commented:
thank you...
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.