Formulas don't calculate

B

Brian Matlack

Hi!
I have a workbook with alot of macros. Sometimes (not always) I have
formulas (not always the same formulas) that will not calculate even
though they appear OK. I have to rebuild the dependancy tree
(ctrl+alt+shift+F9) to get them to calculate.
Since I am a novice at this (VB) I may have some bad code causing the
problem. Is there a code that will cause you to rebuild the dependancy
tree? What might it look like so I can start my search?

Thanks for any suggestions or help! And thanks for your time!!
 
X

xLBaron

Hi Brian -

Try adding this to the end of your macro:

application.CalculateFull

If this doesn't work then try:

Add this macro to your workbook

Sub CalculateFull()
application.CalculateFull
End Sub

then add this to the end of each of your macros

application.Run "' Workbook Name .xls'!CalculateFull"

Good luck
 
G

Guest

Calculate All will lead to forced calculation of all open workbooks, but it
may be not reasonably. Try the following:


Application.Calculation = xlCalculationManual
For Each rabsheet In .Worksheets
rabsheet.Activate
rabsheet.UsedRange.Calculate
Next
Application.Calculation = xlCalculationAutomatic
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top