Solver is part of a suite of commands sometimes called whatif analysis tools. With Solver, you can find an optimal (maximum or minimum) value for a formula in one cell — called the objective cell — subject to constraints, or limits, on the values of other formula cells on a sheet. Solver works with a group of cells, called decision variables or simply variable cells, which participate in computing the formulas in the objective and constraint cells. Solver adjusts the values in the decision variable cells to satisfy the limits on constraint cells and produce the result you want for the objective cell.
You can 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.
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 (decision variable cells B5:C5), up to a total budget constraint of $20,000 (cell D5), until the total profit (objective cell D7) reaches the maximum possible amount. The values in the variable cells are used to calculate the profit for each quarter, so they are related to the formula objective cell D7, =SUM(Q1 Profit:Q2 Profit).
Variable cells
Constrained cell
Objective cell
After Solver runs, the new values are as follows.
Do any of the following:
Define and solve a problem

On the Data tab, under Analysis, click Solver.
If you don't see Solver under Analysis on the Data tab

On the Tools menu, click AddIns.

In the AddIns available list, select the Solver.Xlam check box, and then click OK.


In Set Objective, enter a cell reference or name for the objective cell.
Note: The objective cell must contain a formula.

Do one of the following:
To 
Do this 
Make the value of the objective cell as large as possible 
Click Max. 
Make the value of the objective cell as small as possible 
Click Min. 
Set the objective cell to a certain value 
Click Value Of, and then type the value in the box. 

In the By Changing Variable Cells box, enter a name or reference for each decision variable cell range. Separate the nonadjacent references with commas.
The variable cells must be related directly or indirectly to the objective cell. You can specify up to 200 variable cells.

In the Subject to the Constraints box, add any constraints that you want to apply.
How to add a constraint

In the Solver Parameters dialog box, click Add.

In the Cell Reference box, enter the cell reference or name of the cell range for which you want to constrain the value.

On the <= relationship popup menu, select the relationship that you want between the referenced cell and the constraint.If you choose <=, =, or >=, in the Constraint box, type a number, a cell reference or name, or a formula.
Note: You can only apply the int, bin, and dif relationships in constraints on decision variable cells.

Do one of the following:
To
Do this
Accept the constraint and add another
Click Add.
Accept the constraint and return to the Solver Parameters dialog box
Click OK.


Click Solve, and then do one of the following:
To 
Do this 
Keep the solution values on the sheet 
Click Keep Solver Solution in the Solver Results dialog box. 
Restore the original data 
Click Restore Original Values. 
Notes:

To interrupt the solution process, press ESC . Excel recalculates the sheet 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 sheet 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

On the Data tab, under Analysis, click Solver.
If you don't see Solver under Analysis on the Data tab

On the Tools menu, click AddIns.

In the AddIns available list, select the Solver.Xlam check box, and then click OK.


After you define a problem, in the Solver Parameters dialog box, click Options.

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.

In the Solver Parameters dialog box, click Solve.

In the Show Trial Solution dialog box, do one of the following:
To 
Do this 
Stop the solution process and display the Solver Results dialog box 
Click Stop. 
Continue the solution process and display the next trial solution 
Click Continue. 
Change how Solver finds solutions

On the Data tab, under Analysis, click Solver.
If you don't see Solver under Analysis on the Data tab

On the Tools menu, click AddIns.

In the AddIns available list, select the Solver.Xlam check box, and then click OK.


Click Options, and then in the Solver Options dialog box, choose one or more of the following options:
To 
Do this 
Set solution time and iterations 
On the All Methods tab, under Solving Limits, in the Max Time (Seconds) box, type the number of seconds that you want to allow for the solution time. Then, 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. 
Set the degree of precision 
On the All Methods tab, in the Constraint Precision box, type the degree of precision that you want. The smaller the number, the higher the precision. 
Set the degree of convergence 
On the GRG Nonlinear or Evolutionary tab, 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. 

Click OK.

In the Solver Parameters dialog box, click Solve or Close.
Save or load a problem model

On the Data tab, under Analysis, click Solver.
If you don't see Solver under Analysis on the Data tab

On the Tools menu, click AddIns.

In the AddIns available list, select the Solver.Xlam check box, and then click OK.


Click Load/Save, enter a cell range for the model area, and then click either Save or Load.
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 sheet by saving the workbook. Each sheet in a workbook may have its own Solver selections, and all of them are saved. You can also define more than one problem for a sheet by clicking Load/Save to save problems individually.
Set the solving method used by Solver

On the Data tab, under Analysis, click Solver.
If you don't see Solver under Analysis on the Data tab

On the Tools menu, click AddIns.

In the AddIns available list, select the Solver.Xlam check box, and then click OK.


On the Select a Solving Method popup menu, select one of the following:
Solving Method 
Description 
GRG (Generalized Reduced Gradient) Nonlinear 
The default choice, for models using most Excel functions other than IF, CHOOSE, LOOKUP and other “step” functions. 
Simplex LP 
Use this method for linear programming problems. Your model should use SUM, SUMPRODUCT, +  and * in formulas that depend on the variable cells. 
Evolutionary 
This method, based on genetic algorithms, is best when your model uses IF, CHOOSE, or LOOKUP with arguments that depend on the variable cells. 
Portions of the Solver program code are copyright 19902010 by Frontline Systems, Inc. Portions are copyright 1989 by Optimal Methods, Inc.
For more information about Solver,
contact:
Frontline Systems, Inc.
P.O. Box 4288
Incline Village, NV 894504288
Telephone: (775) 8310300
Email: info@solver.com
or see the Frontline Systems Web site .
For more detailed help on Solver from Frontline Systems, see the Solver Help on the Frontline Systems Web site.