Excel Solver Tutorial
Excel Solver Tutorial
Excel Solver Tutorial
IN EXCEL
Essential Steps
To define an optimization model in Excel you'll follow these essential steps:
1. Organize the data for your problem in the spreadsheet in a logical manner.
2. Choose a spreadsheet cell to hold the value of each decision variable in your
model.
3. Create a spreadsheet formula in a cell that calculates the objective function for
your model.
4. Create a formulas in cells to calculate the left hand sides of each constraint.
5. Use the dialogs in Excel to tell the Solver about your decision variables, the
objective, constraints, and desired bounds on constraints and variables.
Within this overall structure, you have a great deal of flexibility in how you choose cells to hold
your model's decision variables and constraints, and which formulas and built-in functions you
use. In general, your goal should be to create a spreadsheet that communicates its purpose in
a clear and understandable manner.
In the worksheet below, we have reserved cells B4, C4, D4 and E4 to represent our decision
variables X1, X2, X3, and X4representing the number of pallets of each type of panel to produce.
The Solver will determine the optimal values for these cells. (Click on the worksheet for a full-
size image.)
Notice that the profit for each pallet of panels ($450, $1,150, $800 and $400) was entered in
cells B5, C5, D5 and E5, respectively. This allows us to compute the objective in cell F5 as:
or equivalently,
In cells B8:E11, we've entered the amount of resources needed to produce a pallet of each
type of panel. For example, the value 15 in cell C9 means that 15 hours of pressing is required
to produce a pallet of Pacific style panels. These numbers come directly from the formulas for
the constraints shown earlier. With these values in place, we can enter a formula in cell F8 to
compute the total amount of glue used for any number of pallets produced:
We can copy this formula to cells F9:F11 to compute the total amount of pressing, pine chips,
and oaks chips used. (The dollar signs in $B$4:$E$4 specify that this cell range stays constant,
while the cell range B8:E8 becomes B9:E9, B10:E10, and B11:E11 in the copied formulas.)
The formulas in cells F8:F11 correspond to the left hand side values of the constraints.
In cells G8:G11, we've entered the available amount of each type of resource (corresponding
to the right hand side values of the constraints). This allows us to express
the constraints shown earlier as:
F8:F11<=G8:G11
This is equivalent to the four constraints: F8<=G8, F9<=G9, F10<=G10, and F11<=G11. We
can enter this set of constraints directly in the Solver dialogs along with the non-negativity
conditions:
B4:E4 >= 0
Click on the links below to see how this model can be solved using Excel's built-in Solver
(or Premium Solver) or with FrontLine Systems' flagship Risk Solver Platform product.