# Linear Programming with Excel

To solve Linear Program with Excel you need the Solver Add-In. On the File tab, click Options. Under Add-ins, select Solver Add-In and click the Go button. Check Solver Add-in and click OK.

You can find the Solver on Data tab, in the Analyze group as shown in the following picture. ## Write the problem in Excel

To formulate a linear programming problem, take care of the three following data:

1. What are the decisions to be made? For this problem, we need Excel to find out how much to order of each product (bicycles, mopeds and child seats).
2. What are the constraints on these decisions? The constrains here are that the amount of capital and storage used by the products cannot exceed the limited amount of capital and storage (resources) available. For example, each bicycle uses 300 units of capital and 0.5 unit of storage.
3. What is the overall measure of performance for these decisions? The overall measure of performance is the total profit of the three products, so the objective is to maximize this quantity.

In the following example, Decisions variables are in yellow, constraints are in light blue and objectif function is in dark blue. Select each range and on the Formulas tab, in the Defined Names group, click Define Name :

Range Name Cells
UnitProfit C4:E4
OrderSize C12:E12
ResourcesUsed G7:G8
ResourcesAvailable I7:I8
TotalProfit I12

Insert the following SUMPRODUCT function (in order to create constraints and objectif functions): ## Solve the Model

To find the optimal solution, execute the following steps (you have to adapt each step depending to your model).

• On the Data tab, in the Analyze group, click Solver.
• Enter the solver parameters (read on). The result should be consistent with the picture below.
• You have the choice of typing the range names or clicking on the cells in the spreadsheet. Enter TotalProfit for the Objective.
• Click Max.
• Enter OrderSize for the Changing Variable Cells.
• Click Add to enter the following constraint.
• Check ‘Make Unconstrained Variables Non-Negative’ and select ‘Simplex LP’.
• Finally, click Solve.

The optimal solution: 