Solved

xlcalculationmanual in VBa

Posted on 2011-03-23
7
1,037 Views
Last Modified: 2012-06-22
Dear Experts,

I would like to have a good example website to show how it will have code speed advantage
for Application.Calculation = xlCalculationManual and Application.Calculation = xlCalculationAutomatic
I know those functionality but I wonder what situation we will use it individually  for speed ?

Aud during file save, Is it all formula in Excel sheet will be updated even I set it xlCalculationManual ?

Please advise

Thanks
Duncan l
0
Comment
Question by:duncanb7
  • 3
  • 3
7 Comments
 
LVL 20

Expert Comment

by:pari123
Comment Utility
Hi,
if you search in experts-exchange, you can find good articles about this. THere is also a write-up on C Pearson's site.

Here's the link - http://www.cpearson.com/excel/optimize.htm

From my experience, the advantage to set it xlCalculationManual is if when your data is huge and there are a lot of formulas.

If the  xlCalculationManual is set to manual, it won't update on file save.

Let me know if you need any further clarifications,

Thanks,
Ardhendu
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
Comment Utility
I think formulas are recalculated before save

Saqib
0
 
LVL 13

Author Comment

by:duncanb7
Comment Utility
If recaulation before save ,So it might not help me if my VBA code needs to do open file and save file for automation looping 100 files.

THe function might be good when you are doing a VB code debugging or doing a code for sepcifiy sheet from that you
don't want to recaulate other sheets since other sheets value is not important at this moment

AM i right ?

Please advise

Duncan
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 20

Expert Comment

by:pari123
Comment Utility
Hi Duncan,

If you use the following code -

Private Sub Workbook_Open()
Application.Calculation = xlCalculationManual

Application.CalculateBeforeSave = False
End Sub

Open in new window


then this doesn't recalculate while saving.

Application.CalculateBeforeSave = Values are True or False. If calculation is Manual and CalculateBeforeSave is true when you Save the workbook it will be recalculated.
0
 
LVL 13

Author Comment

by:duncanb7
Comment Utility
Dear  pari123,

Thanks for your suggestion ?

But my question, even I don't know

In what situation, xlcalcaulteManual is good for speed optimization  ? or what Is said above is correct  
(THe function might be good when you are doing a VB code debugging or doing a code for sepcifiy sheet from that you
don't want to recaulate other sheets since other sheets value is not important at this moment )

In what situation, Application.CalculateBeforeSave = False,is good for speed optimization  ?




0
 
LVL 20

Accepted Solution

by:
pari123 earned 500 total points
Comment Utility

>> In what situation, Application.CalculateBeforeSave = False,is good for speed optimization  ?

As I mentioned before, it would really make a difference if you have a file with huge volume of data and a lot of formulas. It really differs from sheet to sheet. Say for example, more than 1000 rows of data and 3 columns have formulas in it...so there are 3 * 1000 = 3000 formulas that excel needs to calculate would obivously slow down editing the spreadsheet.

but without looking at the data, you need to make an educated guess on it...
0
 
LVL 13

Author Closing Comment

by:duncanb7
Comment Utility
Thanks for your reply,
It understood more
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now