How to Solve Linear Programming in Excel

••• Stockbyte/Stockbyte/Getty Images

Linear programming is a mathematical method of optimizing an outcome in a mathematical model using linear equations as constraints. To solve a standard form linear program use Microsoft Excel and the Excel Solver add-in. Excel Solver can be enabled in Excel 2010 by clicking "file" in the toolbar, "options," and "Add-in." Check the "Solver Add-in" option, and click "OK." You can access Solver under the "Data" tab in the toolbar. The most basic linear program to solve is standard form.

    Set up the linear program in the form:

    Maximize c(transpose)x Subject to: Ax ≤ b, x ≥ 0

    where c, x, A, and b are matrices. The objective function can also be minimized or equal to some number z. The constraints are in linear form. X does not have to have a non negative constraint. These differences in the linear program depend on the specific problem. However, it is imperative that the linear program be set up correctly. Be sure to make all calculations for the cTx, Ax, and b matrices in Excel before you solve the linear program. You can begin by either setting all values of x to 1 or leaving them unknown. It can be helpful to name the cells by clicking "Insert" in the toolbar, "Name," and "Define." The names of the cells can by typed into Solver directly.

    Open Solver and input the necessary cells. In order to input a cell, click on the Excel icon to the right of the text box, and then click on the desired cell. The "Set Target Cell:" is the objective function. "By changing Cells:" are the variables in your linear program, which is the x matrix. Click on "Add" to add a constraint. The cell reference is the Ax matrix. Choose the type of constraint (greater than or equal to, less than or equal to, or equal to) from the pull down menu. The constraint is the b matrix. If x is non-negative, add this constraint for each x value.

    Choose a correct linear model from the "Select a Solving Method:" pull down menu. Standard form linear programs generally use a LP Simplex solving method. If x has a non-negative constraint, check the box "Make Unconstrained Variables Non-Negative."

    Solve the linear program by clicking on "Solve." Allow Solver to think for a moment. If Solver finds a solution a dialogue box with the title "Solver Results" will pop-up. You are given the choice of keeping the solver solutions or restoring all cells to their original value.

    Tips

    • Make sure all the math is done correctly before running Solver. Name all cells that will be used in Solver such as "objective, x1, x2, A1x1, or b1."

Related Articles

How to Do Algebra in Excel
How to Calculate Correlation Coefficient Between Two...
How to Solve a Quadratic Equation With a Casio Calculator
How to Find Zeros of Functions in Excel
How to Draw an Array in Math
How to Create Matrices on a TI-89
How to Solve by Simpson's Rule With Excel
How to Program Equations with the Casio FX-115ES
How to Graph a Distribution for a T-Test
How to Solve 3-Variable Linear Equations on a TI-84
How to Subtract Matrices on Excel
How to Use a Graphing Calculator
How to Find the Domain Range of a Parabola Parameter...
How to Program a TI 83 Plus Calculator to Solve Rational...
How to Create a Normal Distribution Graph in Excel
How to Calculate Pearson's R (Pearson Correlations)...
How to Decrease Digits in Excel
How to Test Linearity in SPSS
How to Draw a Normal Distribution in Excel
Characteristics of a Linear Programming Problem