Linear Programming in Excel using Solver
This article will show you how to solve the linear programming problem in Excel in detail. Follow the entire article to learn about this.
You are free to use this image on you website, templates, etc., Please provide us with an attribution linkHow to Provide Attribution?Article Link to be HyperlinkedFor eg:Source: Linear Programming in Excel (wallstreetmojo.com)
How to Solve Linear Programming through Excel Solver?
To apply a solver to solve linear programming, we should have an ethical problem in detail. For this example, we have created the below scenario.
Problem: A manufacturer wants to alter the production model of the current product. He has two kinds of products, “Product 1” & “Product 2”. For Product 1 requires three raw materials, Raw Material 1 20 Kg, Raw Material 2 30 Kg, and Raw Material 3 5 Kg. Similarly, for Product 2, it requires three raw materials, Raw Material 1 10 Kg, Raw Material 2 25 Kg, and Raw Material 3 10 Kg.
Manufactures require a minimum of Raw Material 1 – 550 kg, Raw Material 2 800 kg, and Raw Material 3 250 kg. If Product 1 costs Rs. 30 per unit and Product 2 costs 35 per unit, how many units of each product should the manufacturer blend to meet the minimum raw material requirements at a low cost as possible, and what is the price?
Now, we enter all this information into the Excel spreadsheet below.
We need to apply the excel formulaExcel FormulaThe term “basic excel formula” refers to the general functions used in Microsoft Excel to do simple calculations such as addition, average, and comparison. SUM, COUNT, COUNTA, COUNTBLANK, AVERAGE, MIN Excel, MAX Excel, LEN Excel, TRIM Excel, IF Excel are the top ten excel formulas and functions.read more in cells D3 and D5 to D7, Cost * Cost Per Unit. Cost price we need to arrive from the solver in cells B2 and C2. To use the formula below:
After setting up this, we need to go to Excel’s “Solver” tool. The “Solver” tool is available under Excel’s “Data” tab.
Enable Solver Add-in
If the spreadsheet does not show this option, we need to enable it. To allow this solver option, we must follow the below steps.
Step 1: We must first go to the “File” tab. Then, under the “File tab,” click on “Options.”
Step 2: Next, go to “Add-ins” under Excel “Options.”
Step 3: Under this, select “Excel Add-insExcel Add-insAn add-in is an extension that adds more features and options to the existing Microsoft Excel.read more” and click on “Go.”
Step 4: Under the pop-up below, choose “Solver Add-in” and click on “OK” to enable it.
Now, we can see “Solver Add-in” under the “Data” tab.
Solve Linear Programming through Excel Solver
- Go to the “DATA” tab to apply solver to apply the solver and click on the “Solver.” We can see below the window.
In the above window, our first option is “Set Objective.”
Our objective is to identify the “Total Cost,” so our total cost cell is D3, so we must select the cell D3 for this “Set Objective” and set it to “Min.”
Once we click on “Add,” we can see below the add “Constraint” window. Select the B2:C2 range of cells in this window and put the constraint as “>=0”.
Click on “Add” to stay back in the same window. Now in the second constraint, select the range of values as D5:D7 and select “>=” and under “Constraint,” select G5:G7 cells.
Click on “OK” to come out of the “Add Constraint” window.
Now, all our parameters are ready. Click on the “Solve” option to get the result.
So, the cost to produce “Product 1” per unit is 20, and “Product 2” per unit is 15.
Like this, by using “Solver,” we can solve linear programming in Excel.
Things to Remember
Recommended Articles
This article is a guide to Linear Programming in Excel. We discuss how to solve the linear programming problem in Excel using the solver option with an example and a downloadable Excel template. You may learn more about Excel from the following articles: –
- Top 6 Hacks in ExcelLinear Regression ExamplesLinear Regression in ExcelLinear Interpolation in Excel