+ Reply to Thread
Results 1 to 9 of 9

Excel Solver switches Formula Calculation method to manual during long calculations, why?

  1. #1
    Registered User
    Join Date
    01-01-2017
    Location
    Sao Paulo
    MS-Off Ver
    2013
    Posts
    8

    Excel Solver switches Formula Calculation method to manual during long calculations, why?

    When I use Excel Solver and it is doing a long loop/calculation (that lasts more then 30 seconds), it will then switch the Formula Calculation method from Automatic to Manual

    This will ruin a cell that I use as a constraint, when the constraint goes bad the inputs the Solver is coming up with all of the sudden will make no sense and my entire data becomes useless (I get an overflow)

    The issue is that my constraint is a Sum of a range of Changing variables. This works fine for quicker calculations but when I try to go deeper (by switching on Multiple starts) the calculations go much longer and it seems that Excel switches the Formula Calculation method for some reason (crash prevention perhaps?), the sum cell wont update and problems happen

    What can I do? If I could set a constraint as logical statement that would capture the sum of the variables directly, this wouldn't be an issue as Solver would not be able to come up with nonsense. but because I use a different cell (with =sum) as constraint, I become vulnerable to the switching of Formula Calculation and I cant really let Solver run for a long-time

    Any ideas of what can be done?

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Excel Solver switches Formula Calculation method to manual during long calculations, w

    Are you using VBA to run Solver?

    If so see here for one suggestion
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    01-01-2017
    Location
    Sao Paulo
    MS-Off Ver
    2013
    Posts
    8

    Re: Excel Solver switches Formula Calculation method to manual during long calculations, w

    Quote Originally Posted by Richard Buttrey View Post
    Are you using VBA to run Solver?

    If so see here for one suggestion
    No, I'm pulling it up by hand. But there are triggers in changing of cells that execute a sub on VBA. That sub does not call for Solver though, it just runs calculations. One of the calculations (a ratio) is what I'm trying to solve for

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Excel Solver switches Formula Calculation method to manual during long calculations, w

    Please Login or Register  to view this content.
    A sub? You can use a function in a Solver loop; I would not expect a sub to work.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,380

    Re: Excel Solver switches Formula Calculation method to manual during long calculations, w

    We may need more specifics (a sample workbook with all pertinent macros might be best). I do not recall Solver ever switching calculation state on its own.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  6. #6
    Registered User
    Join Date
    01-01-2017
    Location
    Sao Paulo
    MS-Off Ver
    2013
    Posts
    8

    Re: Excel Solver switches Formula Calculation method to manual during long calculations, w

    Quote Originally Posted by shg View Post
    Please Login or Register  to view this content.
    A sub? You can use a function in a Solver loop; I would not expect a sub to work.
    It does work and it does give me some results, its just that I want to exaust almost all possibilities to find the optimal solution. how can one use a function in a solver loop?

  7. #7
    Registered User
    Join Date
    01-01-2017
    Location
    Sao Paulo
    MS-Off Ver
    2013
    Posts
    8

    Re: Excel Solver switches Formula Calculation method to manual during long calculations, w

    I already put Application.Calculation = xlCalculationAutomatic in two places inside my Sub, yet, it will still stop and overflow me after 50 seconds me or so. When I debug I see that the inputs to the Changing Variables make no sense (their sum goes over what it should be), the sum cell was not updated and thats what caused the problem

  8. #8
    Registered User
    Join Date
    01-01-2017
    Location
    Sao Paulo
    MS-Off Ver
    2013
    Posts
    8

    Re: Excel Solver switches Formula Calculation method to manual during long calculations, w

    I got 4 Changing Variables whose sums cannot be over 1 (or I get an overflow), I got a sum cell (that adds up those Variables) setup as a constraint. but during the loops for some reason, the sum cell stops updating then Solver will change the variables to things that add up more than 1, the sum goes over 1 and my algo will get an overflow

    I tried setting up individual constraints in the Changing Variables to make sure they individually dont go over 1 but its not enough as they can still add up to more than 1 all the way to 4. Is there a way to insert some extra logic in the Constraints?

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Excel Solver switches Formula Calculation method to manual during long calculations, w

    Did you read post #5?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 08-04-2015, 07:39 AM
  2. Excel keeps changing to Manual Calculation
    By zookeepertx in forum Excel General
    Replies: 11
    Last Post: 12-29-2014, 06:52 PM
  3. Formula Optimize and Manual calculation for only one sheet.
    By baachi76 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-19-2014, 01:16 PM
  4. Replies: 4
    Last Post: 07-23-2013, 07:51 AM
  5. calculation changes to manual on excel
    By Shadmani in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 07-08-2009, 02:46 PM
  6. Filter Switches vs Calculations?
    By Ken in forum Excel General
    Replies: 6
    Last Post: 02-25-2005, 02:06 PM
  7. [SOLVED] Excel Calculations Open in Manual Occasionally
    By rich32822 in forum Excel General
    Replies: 1
    Last Post: 02-18-2005, 10:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1