VBA code for Calculation Full not working

tiredandemotional

New Member
Joined
Sep 14, 2017
Messages
1
I have a large workbook of 70 pages containing many arrays.

Only after enabling macros, does the workbook give #Value errors.

The workbook contains the following Switch to break iterative calculations:
Code:
=IF(Switch,AVERAGE(+CashMonthlyBf,+CashMonthlyCf),0)

The workbook opens with the following settings:
Calculations set to: Automatic except for data tables
Iterative calculations: Enabled
Maximum iterations: 100
Maximum change: 0.001
Switch set to FALSE

Only by pressing CTRL-ALT-F9 or Calculate Full from the Quick Access Toolbar with the Switch set to FALSE, are the #Value errors resolved.

Setting the Switch to TRUE enables the iterative calculation to work.

The only change that I can think of that may have caused the problem was the recent introduction of a significant number of SUMIFS.

I have tried to achieve the above programmatically (i.e. recalculate (CTRL-ALT-F9) and then set the Switch to TRUE) as follows:

Code:
                Application.CalculateFull
                Do While Application.CalculationState <> xlDone
                                DoEvents
                Loop
                Range("Switch") = True

However, this does not work.

I should be very grateful for any assistance in resolve this problem, including any thoughts about the use of arrays and/or SUMIFS in potentially causing it.

Thank you
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,223,911
Messages
6,175,323
Members
452,635
Latest member
laura12345

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