Define and solve a problem by using Solver Excel 2007

Author: mety Labels::

Solver is part of a suite of commands sometimes called what-if analysis (what-if analysis: A process of changing the values in cells to see how those changes affect the outcome of formulas on the worksheet. For example, varying the interest rate that is used in an amortization table to determine the amount of the payments.) tools. With Solver, you can find an optimal value for a formula (formula: A sequence of values, cell references, names, functions, or operators in a cell that together produce a new value. A formula always begins with an equal sign (=).) in one cell — called the target cell — on a worksheet. Solver works with a group of cells that are related, either directly or indirectly, to the formula in the target cell. Solver adjusts the values in the changing cells that you specify — called the adjustable cells — to produce the result that you specify from the target cell formula. You can apply constraints (constraints: The limitations placed on a Solver problem. You can apply constraints to adjustable cells, the target cell, or other cells that are directly or indirectly related to the target cell.) to restrict the values that Solver can use in the model, and the constraints can refer to other cells that affect the target cell formula.

Use Solver to determine the maximum or minimum value of one cell by changing other cells. For example, you can change the amount of your projected advertising budget and see the effect on your projected profit amount.

Example of a Solver evaluation

In the following example, the level of advertising in each quarter affects the number of units sold, indirectly determining the amount of sales revenue, the associated expenses, and the profit. Solver can change the quarterly budgets for advertising (cells B5:C5), up to a total budget constraint of $20,000 (cell F5), until the value for the total profit reaches the maximum possible amount. The values in the adjustable cells are used to calculate the profit for each quarter, so the values are related to the formula in the target cell F7, =SUM(Q1 Profit:Q2 Profit).



Before Solver evaluation

Callout 1 Adjustable cells

Callout 2 Constrained cell

Callout 3 Target cell



After Solver runs, the new values are as follows.

After Solver evaluation

Define and solve a problem

  1. If the Solver command or the Analysis group is not available, you need to load the Solver Add-in (add-in: A supplemental program that adds custom commands or custom features to Microsoft Office.) program.

    HideHow to load the Solver Add-in program

    1. Click the Microsoft Office Button Button image, click Excel Options, and then click the Add-ins category.
    2. In the Manage box, click Excel Add-ins, and then click Go.
    3. In the Add-ins available box, select the Solver Add-in check box, and then click OK.
  2. In the Set Target Cell box, enter a cell reference (cell reference: The set of coordinates that a cell occupies on a worksheet. For example, the reference of the cell that appears at the intersection of column B and row 3 is B3.) or name (name: A word or string of characters that represents a cell, range of cells, formula, or constant value. Use easy-to-understand names, such as Products, to refer to hard to understand ranges, such as Sales!C20:C30.) for the target cell. The target cell must contain a formula (formula: A sequence of values, cell references, names, functions, or operators in a cell that together produce a new value. A formula always begins with an equal sign (=).).
  3. Do one of the following:
    • If you want the value of the target cell to be as large as possible, click Max.
    • If you want the value of the target cell to be as small as possible, click Min.
    • If you want the target cell to be a certain value, click Value of, and then type the value in the box.
  4. In the By Changing Cells box, enter a name or reference for each adjustable cell. Separate the nonadjacent references with commas. The adjustable cells must be related directly or indirectly to the target cell. You can specify up to 200 adjustable cells.
  5. If you want Solver to automatically propose the adjustable cells based on the target cell, click Guess.
  6. In the Subject to the Constraints box, enter any constraints (constraints: The limitations placed on a Solver problem. You can apply constraints to adjustable cells, the target cell, or other cells that are directly or indirectly related to the target cell.) that you want to apply.

    HideHow to add, change, or delete a constraint

    HideAdd a constraint

    1. In the Solver Parameters dialog box, under Subject to the Constraints, click Add.
    2. In the Cell Reference box, enter the cell reference (cell reference: The set of coordinates that a cell occupies on a worksheet. For example, the reference of the cell that appears at the intersection of column B and row 3 is B3.) or name (name: A word or string of characters that represents a cell, range of cells, formula, or constant value. Use easy-to-understand names, such as Products, to refer to hard to understand ranges, such as Sales!C20:C30.) of the cell range for which you want to constrain the value.
    3. Click the relationship ( <=, =, >=, int, or bin ) that you want between the referenced cell and the constraint (constraints: The limitations placed on a Solver problem. You can apply constraints to adjustable cells, the target cell, or other cells that are directly or indirectly related to the target cell.). If you click int, integer appears in the Constraint box. If you click bin, binary appears in the Constraint box.
    4. In the Constraint box, type a number, a cell reference or name, or a formula (formula: A sequence of values, cell references, names, functions, or operators in a cell that together produce a new value. A formula always begins with an equal sign (=).).
    5. Do one of the following:
      • To accept the constraint and add another, click Add.
      • To accept the constraint and return to the Solver Parameters dialog box, click OK.

    Notes

    • You can apply the int and bin relationships only in constraints on adjustable cells.
    • When the Assume Linear Model check box in the Solver Options dialog box is selected, there is no limit on the number of constraints. For nonlinear problems, each adjustable cell can have up to 100 constraints, in addition to bounds and integer restrictions on the variables.

    HideChange or delete a constraint

    1. In the Solver Parameters dialog box, under Subject to the Constraints, click the constraint (constraints: The limitations placed on a Solver problem. You can apply constraints to adjustable cells, the target cell, or other cells that are directly or indirectly related to the target cell.) that you want to change or delete.
    2. Click Change and then make your changes, or click Delete.
  7. Click Solve and do one of the following:
    • To keep the solution values on the worksheet, click Keep Solver Solution in the Solver Results dialog box.
    • To restore the original data, click Restore Original Values.

    Notes

    • You can interrupt the solution process by pressing ESC. Microsoft Office Excel recalculates the worksheet with the last values that are found for the adjustable cells.
    • To create a report that is based on your solution after Solver finds a solution, you can click a report type in the Reports box and then click OK. The report is created on a new worksheet in your workbook. If Solver doesn't find a solution, the option to create a report is unavailable.
    • To save your adjusting cell values as a scenario that you can display later, click Save Scenario in the Solver Results dialog box, and then type a name for the scenario in the Scenario Name box.

Step through Solver trial solutions

  1. After you define a problem, click Options in the Solver Parameters dialog box.
  2. In the Solver Options dialog box, select the Show Iteration Results check box to see the values of each trial solution, and then click OK.
  3. In the Solver Parameters dialog box, click Solve.
  4. In the Show Trial Solution dialog box, do one of the following:
    • To stop the solution process and display the Solver Results dialog box, click Stop.
    • To continue the solution process and display the next trial solution, click Continue.

Change how Solver finds solutions

  1. In the Solver Parameters dialog box, click Options.
  2. In the Solver Options dialog box, choose one or more of the following options:

    HideSolution time and iterations

    1. In the Max Time box, type the number of seconds that you want to allow for the solution time.
    2. In the Iterations box, type the maximum number of iterations that you want to allow.

    Note If the solution process reaches the maximum time or number of iterations before Solver finds a solution, Solver displays the Show Trial Solution dialog box.

    HideDegree of precision

    • In the Precision box, type the degree of precision that you want. The smaller the number, the higher the precision.

    HideInteger tolerance

    • In the Tolerance box, type the percentage of error that you want to allow in the solution.

    HideDegree of convergence

    • In the Convergence box, type the amount of relative change that you want to allow in the last five iterations before Solver stops with a solution. The smaller the number, the less relative change is allowed.

    Note You can click the Help button in the dialog box to get more information about other options.

  3. Click OK.
  4. In the Solver Parameters dialog box, click Solve or Close.

Save or load a problem model

  1. Click Options.
  2. Click Save Model or Load Model.
  3. When you save a model, enter the reference for the first cell of a vertical range of empty cells in which you want to place the problem model. When you load a model, enter the reference for the entire range of cells that contains the problem model.

    Tip You can save the last selections in the Solver Parameters dialog box with a worksheet by clicking the Microsoft Office Button Button image, and then by clicking Save. You can also define more than one problem for a worksheet by clicking Save Model to save problems individually.

0 comments |

Labels

Blog Archive

Powered by Blogger.

I made these pages for me and my friends to help solving the problem we face regarding Computer & internet, if anyone wants me to answer a question or find out about some information please send me email and I will try to reply.*P.S. some of the article I wrote and the other I found on the internet I posted them in sprit of learning and shearing, please forgive me if you found something you don’t want to be in my blog, email me and I will delete them. Thank you for your interest in my pages.امل نجم Amal Nagm

banner 1 banner 2