XL: Cannot Change or Delete Constraints in Solver

Last reviewed: February 2, 1998
Article ID: Q124499
The information in this article applies to:
  • Microsoft Excel for Windows, version 5.0c
  • Microsoft Excel for the Macintosh, version 5.0, 5.0a
  • Microsoft Excel for Windows 95, version 7.0

SYMPTOMS

In Microsoft Excel 5.x, when you try to change or delete the constraints in the Solver model, you may receive an error message. If you change the constraints, you may receive the error message:

   Solver: An unexpected internal error occurred, or available
   memory was exhausted ($C$187). Please verify that your
   model is correctly entered and all cells contain numeric values.

If you try to delete the constraints in the Solver model, you may receive the error message:

   Run-time error '13':
   Type mismatch

In Microsoft Excel version 7.0, when you try to change a constraint in your Solver model, you may receive the following error:

   Solver: An unexpected internal error occurred, or available memory was
   exhausted ($C$191). Please verify that your model is correctly entered
   and all cells contain numeric values.

CAUSE

You may receive these error messages for any/all of the following reasons:

  • The worksheet has been changed: cells have been moved, added, or deleted. The model will be trying to use incorrect cells, and it will not let you change or delete the constraints.

        -or-
    
  • You are using defined names in the cells that are set to change in the Solver Parameters dialog box.

        -or-
    
  • You are using defined names for cells used in your constraints.

WORKAROUND

Method 1

If the worksheet has been changed, the only way to resolve this problem is to copy all the data to a new sheet, and rebuild the model (constraints) in the new sheet.

Method 2

If you are using defined names, do the following to change or delete existing constraints in your Solver model:

  1. If you are currently in the Solver Parameters dialog box, click Close.

  2. Delete any defined names for the cells used in the Solver Parameters dialog box.

  3. On the Insert menu, click Name, and then click Define.

  4. Select the relevant defined name, and click Delete.

  5. Repeat step 2 for each defined name that needs to be deleted.

  6. In the Define Name dialog box, click OK.

  7. On the Tools menu, click Solver.

  8. In the Solver Parameters Dialog box, click Change or Delete.

You should now be able to change or delete constraints.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.

The problem of Deleting a constraint that uses a defined name has been fixed in Microsoft Excel for Windows 95 version 7.0. But, you may still receive an error in this version of Microsoft Excel if you try to Change a constraint that is using a defined name.

REFERENCES

"User's Guide," version 5.0, Chapter 29, "Using Solver to Analyze Multiple-Variable Problems," and Chapter 30, "Examples of Using Solver"

For more information about Solver, choose the Search button in Help and type:

   Solver Constraints


Additional query words: 5.00 5.00a 5.00c
Keywords : kbtool
Version : WINDOWS: 5.0c, 7.0; MACINTOSH: 5.0, 5.0a
Platform : MACINTOSH WINDOWS
Issue type : kbbug
Solution Type : kbworkaround


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 2, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.