Using solver with excel

Solver is a Microsoft Excel add-in program you can use for what-if analysis. Use Solver to 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 worksheet. Solver works with a group of cells, called decision variables or simply variable cells that are used 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.

Put simply, 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.

Note: Versions of Solver prior to Excel 2007 referred to the objective cell as the «target cell,» and the decision variable cells as «changing cells» or «adjustable cells». Many improvements were made to the Solver add-in for Excel 2010, so if you’re using Excel 2007 your experience will be slightly different.

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 F5), until the total profit (objective cell F7) 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 F7, =SUM (Q1 Profit:Q2 Profit).

Before Solver evaluation

1. Variable cells

2. Constrained cell

3. Objective cell

After Solver runs, the new values are as follows.

After Solver evaluation

  1. On the Data tab, in the Analysis group, click Solver.
    Excel  Ribbon Image

    Note: If the Solver command or the Analysis group is not available, you need to activate the Solver add-in. See: How to activate the Solver add-in.

    Image of the Excel 2010+ Solver dialog

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

  3. Do one of the following:

    • If you want the value of the objective cell to be as large as possible, click Max.

    • If you want the value of the objective cell to be as small as possible, click Min.

    • If you want the objective cell to be 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 non-adjacent references with commas. The variable cells must be related directly or indirectly to the objective cell. You can specify up to 200 variable cells.

  4. In the Subject to the Constraints box, enter any constraints that you want to apply by doing the following:

    1. In the Solver Parameters dialog box, click Add.

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

    3. Click the relationship ( <=, =, >=, int, bin, or dif ) that you want between the referenced cell and the constraint.If you click int, integer appears in the Constraint box. If you click bin, binary appears in the Constraint box. If you click dif, alldifferent appears in the Constraint box.

    4. If you choose <=, =, or >= for the relationship in the Constraint box, type a number, a cell reference or name, or a formula.

    5. Do one of the following:

      • To accept the constraint and add another, click Add.

      • To accept the constraint and return to the Solver Parameters dialog box, click OK.
        Note    You can apply the int, bin, and dif relationships only in constraints on decision variable cells.

        You can change or delete an existing constraint by doing the following:

    6. In the Solver Parameters dialog box, click the constraint that you want to change or delete.

    7. Click Change and then make your changes, or click Delete.

  5. Click Solve and do one of the following:

    • To keep the solution values on the worksheet, in the Solver Results dialog box, click Keep Solver Solution.

    • To restore the original values before you clicked Solve, click Restore Original Values.

    • You can interrupt the solution process by pressing Esc. Excel recalculates the worksheet with the last values that are found for the decision variable 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 worksheet in your workbook. If Solver doesn’t find a solution, only certain reports or no reports are available.

    • To save your decision variable 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.

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

  2. In the Options dialog box, select the Show Iteration Results check box to see the values of each trial solution, and then click OK.

  3. In the Solver Parameters dialog box, click Solve.

  4. In the Show Trial Solution dialog box, do one of the following:

    • To stop the solution process and display the Solver Results dialog box, click Stop.

    • To continue the solution process and display the next trial solution, click Continue.

  1. In the Solver Parameters dialog box, click Options.

  2. Choose or enter values for any of the options on the All Methods, GRG Nonlinear, and Evolutionary tabs in the dialog box.

  1. In the Solver Parameters dialog box, click Load/Save.

  2. Enter a cell range for the model area, and 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 worksheet by saving the workbook. Each worksheet 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 worksheet by clicking Load/Save to save problems individually.

You can choose any of the following three algorithms or solving methods in the Solver Parameters dialog box:

  • Generalized Reduced Gradient (GRG) Nonlinear    Use for problems that are smooth nonlinear.

  • LP Simplex    Use for problems that are linear.

  • Evolutionary    Use for problems that are non-smooth.

Important: You should enable the Solver add-in first. For more information, see Load the Solver add-in.

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).

Example Solver evaluation

Callout 1 Variable cells

Constrained cell

Callout 3  Objective cell

After Solver runs, the new values are as follows.

Example Solver evaluation with new values

  1. In Excel 2016 for Mac: Click Data > Solver.

    Solver

    In Excel for Mac 2011: Click the Data tab, under Analysis, click Solver.

    Data tab, Analysis group, Solver Add-In

  2. In Set Objective, enter a cell reference or name for the objective cell.

    Note: The objective cell must contain a formula.

  3. 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.

  4. 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.

  5. In the Subject to the Constraints box, add any constraints that you want to apply.

    To add a constraint, follow these steps:

    1. In the Solver Parameters dialog box, click Add.

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

    3. On the <= relationship pop-up 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.

    4. 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.

  6. 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: 

  1. To interrupt the solution process, press ESC . Excel recalculates the sheet with the last values that are found for the adjustable cells.

  2. 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.

  3. 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.

  1. In Excel 2016 for Mac: Click Data > Solver.

    Solver

    In Excel for Mac 2011: Click the Data tab, under Analysis, click Solver.

    Data tab, Analysis group, Solver Add-In

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

  3. Select the Show Iteration Results check box to see the values of each trial solution, and then click OK.

  4. In the Solver Parameters dialog box, click Solve.

  5. 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.

  1. In Excel 2016 for Mac: Click Data > Solver.

    Solver

    In Excel for Mac 2011: Click the Data tab, under Analysis, click Solver.

    Data tab, Analysis group, Solver Add-In

  2. Click Options, and then in the Options or 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.

  3. Click OK.

  4. In the Solver Parameters dialog box, click Solve or Close.

  1. In Excel 2016 for Mac: Click Data > Solver.

    Solver

    In Excel for Mac 2011: Click the Data tab, under Analysis, click Solver.

    Data tab, Analysis group, Solver Add-In

  2. 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.

  1. In Excel 2016 for Mac: Click Data > Solver.

    Solver

    In Excel for Mac 2011: Click the Data tab, under Analysis, click Solver.

    Data tab, Analysis group, Solver Add-In

  2. On the Select a Solving Method pop-up 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.

Note: Portions of the Solver program code are copyright 1990-2010 by Frontline Systems, Inc. Portions are copyright 1989 by Optimal Methods, Inc.

Because add-in programs aren’t supported in Excel for the web, you won’t be able to use the Solver add-in to run what-if analysis on your data to help you find optimal solutions.

If you have the Excel desktop application, you can use the Open in Excel button to open your workbook to use the Solver add-in.

More help on using Solver

For more detailed help on Solver contact:

Frontline Systems, Inc.
P.O. Box 4288
Incline Village, NV 89450-4288
(775) 831-0300
Web site: http://www.solver.com
E-mail: info@solver.com
Solver Help at www.solver.com.

Portions of the Solver program code are copyright 1990-2009 by Frontline Systems, Inc. Portions are copyright 1989 by Optimal Methods, Inc.

Need more help?

You can always ask an expert in the Excel Tech Community or get support in the Answers community.

See Also

Using Solver for capital budgeting

Using Solver to determine the optimal product mix

Introduction to what-if analysis

Overview of formulas in Excel

How to avoid broken formulas

Detect errors in formulas

Keyboard shortcuts in Excel

Excel functions (alphabetical)

Excel functions (by category)

Skip to content

Full Guide to Solver in Excel: How to Use + Install (2023)

Full Guide to Solver in Excel: How to Use + Install (2023)

We make many assumptions when creating financial models in Microsoft Excel.

These assumptions also have limitations 🚧

If you want to find optimal solutions from a model, you must change these assumptions.

It will take hours to get the answer if you try to change these assumptions manually ⏳

That’s where the Excel Solver feature comes in handy!

In this lesson, I will explain this complex Excel feature in a very easy manner.

You can download the workbook and follow along with me.

What is the Solver add-in?

The Solver add-in is an Excel optimization tool.

You can use the Excel solver to perform a what-if analysis with multiple variables in your model.

It will find an optimal solution for a formula by changing the related variables.

We can add constraints on how much one variable can vary when we change the others.

The solver is useful for Linear programming problems in business, programming, and engineering.

Because of this, Solver is also known as a “Linear Programming Solver.”

However, you can solve both non-smooth or continuous functions as well as smooth non-linear issues with the Excel Solver.

How to add the Solver add-in

The Solver add-in, like the Analysis ToolPak of Excel, is a Microsoft Excel add-in program.

As a result, it is not immediately available in Excel by default.

We must install it 🤔

Let’s look at how to add the Solver add-in to our Excel workbook.

  1. Go to the file tab in your Excel file.
Go to the file tab in Excel.
  1. Select options at the bottom of the left-hand sidebar.
Select options from the file tab.
  1. Select Add-ins from the Excel options window.
Select Add-ins from Excel options.
  1. Then in the Manage box, select excel add-ins and click “Go…”.
  1. Select the Solver Add-in check box from the Add-ins available box. Then, click OK.
Select the Solver Add-in check box from the Add-ins available box.

Now the Excel Solver Add-ins are loaded to Microsoft excel 👌

Now, go to the Data tab.

To check view the Excel Solver button - Go to the data tab in the Excel file.

You can see the Excel solver command in the analysis group of the Data tab.

Excel Solver button in the analysis group of the Data tab.

You can click Solver to open the Solver parameters dialog box.

Excel Solver parameters dialog box

How to use Solver in Excel

It is important to learn different parts of the Solver parameter dialog box before we use it 🧑🏻‍🎓

Set Objective

The set objective is the first input for the Excel Solver parameter dialog box.

In the set objective box, we have to select the cell reference for the objective cell.

The objective cell must have a formula.

Kasper Langmann, Microsoft Office Specialist

Then you can set the objective cell to one of the following.

  • Max
  • Min
  • Value of – If you select “Value of”, you must specify the target value in the box.
Solver parameters dialog box - Set objectives

By changing variable cells

In this “by changing variable cells”, you have to select all the variable cells to get the optimal solution.

The variable cells are directly or indirectly related to the target cell.

Currently, you can include up to 200 variable cells for the Excel solver function.

If the variable cells are non-adjacent cells, you have to separate them with commas.

Solver parameters window - By changing variable cells

Subject to the constraints

Excel Solver can find the optimal solution within constraints or limits.

We can add constraints in this constraint box.

Solver parameters window - Subject to constraints

To add constraints, click add button.

Then “Add constraint” box will pop up.

You can select the variable cell for the cell reference box and add the limit in the constraint box.

You must specify the relationship between the cell reference box and the constraint box also.

Do you want to delete or change an existing constraint? 👇🏻

Select that constraint from the Excel Solver parameters dialog box.

Then click the change button to change the existing constraint.

Or click the delete button to delete that.

Kasper Langmann, Microsoft Office Specialist

Select a solving method

In Excel solver, we can select one of the solving methods from the following 3.

  • GRG non-linear – For solver problems that are smooth nonlinear.
  • Simplex LP – For linear programming problems.
  • Evolutionary – For solver problems that are non-smooth.
Excel Solver parameters - Solving methods

Now you are familiar with the Excel solver add-in options window 💪🏻

Let’s use Excel Solver to find a solution for a linear programming model.

Linear programming with Solver add-in

In the below example, we have to find how many units we have to sell in order to get the desired outcome of profit.

Data set - Excel solver example

Let’s learn step by step how to use the Excel Solver solution to our linear programming problem.

  1. Go to the data tab and click solver to open the Excel Solver.
  2. Select the objective cell reference.

Our goal is to set the total profit in cell B7 to $900.

So, B7 is the objective cell.

As we need to match the value of the objective cell to $900, we have to select the option of “Value of”.

Then type 900, next to the “value of” option.

Excel Solver - Setting objective cell reference to value of $900
  1. Select the variable cells.

The variable for the target value is the quantity for each cell.

So, in this case, the variable cells are B2, C2, and D2.

Excel Solver - Selecting variable cells.
  1. Click the “Add” tab to add constraints for each variable.

Choose each product’s quantity cell as a cell reference.

Then choose the referenced cell’s maximum amount as the constraint.

Next, choose the link between the referred cell.

Here we select “less than or equal sign” because the constraint is maximum quantity.

Again, we need the quantities as whole numbers.

So, we set another constraint for each variable cell as an Integer.

Excel Solver - Adding maximum amounts as constraints
Excel Solver - Set the quantity as an integer.

After entering all constraints, the solver displays all constraints for the particular solution.

Solver displays all constraints for possible solutions
  1. Select the “Simplex LP” as we are solving a linear solver problem and click the “Solve” button at the bottom of the window.
Excel Solver - Selecting the solving method
  1. Then, you can see the Solver results dialog box with options to “keep solver solution” and to “restore original values”.

Select the “keep solver solution” and click “OK”.

Excel Solver - Last step

To get a total profit of $900, we have to sell 149 in vanilla flavour, 114 in chocolate flavour, and 75 in banana flavour.

Excel Solver - Results

That’s it – Now what?

Now you have learned Excel Solver a hidden gem of an Excel 💎

You can use this to solve many problems in financial models.

But, before you use Excel Solver for your model, you must make sure all your functions such as IF, SUMIF, and VLOOKUP are correctly applied in the model.

Otherwise, the Solver will take hours to get the solution and may give incorrect results.

Click here to access my free 30-minute online course where you can learn about IF, SUMIF, and VLOOKUP if you haven’t already.

Frequently asked questions

When you need to change only one input to get the desired outcome of a formula, you can easily use Excel’s inbuilt feature Goal Seek.

We have to specify the formula cell, the target value for the formula cell, and the cell to change in order to get the target value.

Only 200 decision variables are currently supported by Excel solver.

This restriction applies to both linear and nonlinear models.

Another problem is that we cannot ensure that we will obtain the solver model’s optimal solution if it is not linear.

Kasper Langmann2023-01-10T18:48:32+00:00

Page load link


Download Article


Download Article

  • Enabling Solver
  • |

  • Analyzing and Solving
  • |

  • Video
  • |

  • Tips
  • |

  • Warnings

This wikiHow teaches you how to use Microsoft Excel’s Solver tool, which allows you to alter different variables in a spreadsheet in order to achieve a desired solution. You can use Solver in both Windows and Mac versions of Excel, though you’ll have to enable Solver before you can begin using it.

  1. Image titled Use Solver in Microsoft Excel Step 1

    1

    Open Excel. Click or double-click the Excel app icon, which resembles a green box with a white «X» on it.

    • Solver comes pre-installed with both Windows and Mac versions of Excel, but you’ll have to enable it manually.
  2. Image titled Use Solver in Microsoft Excel Step 2

    2

    Click Blank workbook. This will open the Excel window, from which point you can proceed with enabling Solver.

    • If you have an existing Excel file you’d like to use Solver with, you can open it instead of creating a new file.

    Advertisement

  3. Image titled Use Solver in Microsoft Excel Step 3

    3

    Click File. It’s a tab in the upper-left side of the Excel window.

    • On a Mac, click Tools instead, then skip the next step.
  4. Image titled Use Solver in Microsoft Excel Step 4

    4

    Click Options. You’ll find this option at the bottom of the File menu. Doing so brings up the Options window.[1]

  5. Image titled Use Solver in Microsoft Excel Step 5

    5

    Click Add-ins. It’s a tab in the lower-left side of the Options window.

    • On a Mac, click Excel Add-ins in the Tools menu.
  6. Image titled Use Solver in Microsoft Excel Step 6

    6

    Open the «Add-ins Available» window. Make sure that the «Manage» text box has «Excel Add-ins» listed in it, then click Go at the bottom of the page.

    • On a Mac, this window will open after clicking Excel Add-ins in the Tools menu.
  7. Image titled Use Solver in Microsoft Excel Step 7

    7

    Install the Solver add-in. Check the «Solver» box in the middle of the page, then click OK. Solver should now appear as a tool in the Data tab that’s at the top of Excel.

  8. Advertisement

  1. Image titled Use Solver in Microsoft Excel Step 8

    1

    Understand Solver’s use. Solver can analyze your spreadsheet’s data and any constraints you’ve added to show you possible solutions. This is useful if you’re working with multiple variables.

  2. Image titled Use Solver in Microsoft Excel Step 9

    2

    Add your data to your spreadsheet. In order to use Solver, your spreadsheet must have data with different variables and a solution.

    • For example, you might create a spreadsheet documenting your various expenses over the course of a month with the output cell resulting in your money left over.
    • You can’t use solver on a spreadsheet which doesn’t have solvable data (i.e., your data has to have equations).
  3. Image titled Use Solver in Microsoft Excel Step 10

    3

    Click the Data tab. It’s at the top of the Excel window. This will open the Data toolbar.

  4. Image titled Use Solver in Microsoft Excel Step 11

    4

    Click Solver. You’ll find this option in the far-right side of the Data toolbar. Doing so opens the Solver window.

  5. Image titled Use Solver in Microsoft Excel Step 12

    5

    Select your target cell. Click the cell in which you want to display your Solver solution. This will add it to the «Set Objective» box.

    • For example, if you’re creating a budget where the end goal is your monthly income, you would click the final «Income» cell.
  6. Image titled Use Solver in Microsoft Excel Step 13

    6

    Set a goal. Check the «Value Of» box, then type your target value into the text box next to «Value Of».

    • For example, if your goal is to have $200 at the end of the month, you would type 200 into the text box.
    • You can also check either the «Max» or «Min» box in order to prompt Solver to determine the absolute maximum or minimum value.
    • Once you’ve set a goal, Solver will attempt to meet that goal by adjusting other variables in your spreadsheet.
  7. Image titled Use Solver in Microsoft Excel Step 14

    7

    Add constraints. Constraints set restrictions on the values that Solver can use, which prevents Solver from accidentally nullifying one or more of your spreadsheet’s values. You can add a constraint by doing the following:[2]

    • Click Add
    • Click the cell (or select the cells) for which the constraint applies.
    • Select a type of constraint from the middle drop-down menu.
    • Enter the constraint’s number (e.g., a maximum or minimum).
    • Click OK
  8. Image titled Use Solver in Microsoft Excel Step 15

    8

    Run Solver. Once you’ve added all of your constraints, click Solve at the bottom of the Solver window. This will prompt Solver to find the optimal solution for your problem.

  9. Image titled Use Solver in Microsoft Excel Step 16

    9

    Review the results. When Solver alerts you that it has an answer, you can see the answer by looking at your spreadsheet to see which values were changed.

  10. Image titled Use Solver in Microsoft Excel Step 17

    10

    Change your Solver criteria. If the output that you received isn’t ideal for your spreadsheet, click Cancel in the pop-up window, then adjust your objective and constraints.

    • If you do like your Solver’s results, you can apply them to your spreadsheet by checking the «Keep Solver Solution» box and then clicking OK.
  11. Advertisement

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

Advertisement

Video

  • Solver is best used for problems such as scheduling employees, determining the lowest price for which you can sell items while meeting a financial goal, and budgeting.

Thanks for submitting a tip for review!

Advertisement

  • Solver cannot be used in spreadsheets in which there is no «output» or actual solution. For example, you can’t apply solver to a spreadsheet which has no equations.

Advertisement

About This Article

Article SummaryX

1. Enable Solver in the «Add-ins» section of your Excel preferences if necessary.
2. Open a spreadsheet with data you want to analyze.
3. Click Data, then click Solver.
4. Select a cell to use from the «Set Objective» field.
5. Check the «Value Of» box, then enter a desired value.
6. Click Solve.

Did this summary help you?

Thanks to all authors for creating a page that has been read 590,232 times.

Is this article up to date?

Solver – это надстройка Microsoft Excel, которую можно использовать для оптимизации в анализе «что, если».

По мнению О’Брайена и Маракаса, оптимизационный анализ является более сложным расширением целенаправленного анализа. Вместо того, чтобы устанавливать конкретное целевое значение для переменной, цель состоит в том, чтобы найти оптимальное значение для одной или нескольких целевых переменных при определенных ограничениях. Затем одна или несколько других переменных меняются неоднократно, с учетом указанных ограничений, пока вы не найдете лучшие значения для целевых переменных.

В Excel вы можете использовать Solver, чтобы найти оптимальное значение (максимальное или минимальное или определенное значение) для формулы в одной ячейке, называемой целевой ячейкой, при условии соблюдения определенных ограничений или ограничений для значений других ячеек формулы на рабочем листе. ,

Это означает, что Солвер работает с группой ячеек, называемых переменными решения, которые используются при вычислении формул в ячейках цели и ограничения. Солвер корректирует значения в ячейках переменных решения, чтобы удовлетворить ограничения на ячейки ограничений и получить желаемый результат для целевой ячейки.

Вы можете использовать Solver, чтобы найти оптимальные решения для различных проблем, таких как –

  • Определение ежемесячного ассортимента продукции для подразделения по производству лекарств, которое максимизирует прибыльность.

  • Планирование рабочей силы в организации.

  • Решение транспортных проблем.

  • Финансовое планирование и бюджетирование.

Определение ежемесячного ассортимента продукции для подразделения по производству лекарств, которое максимизирует прибыльность.

Планирование рабочей силы в организации.

Решение транспортных проблем.

Финансовое планирование и бюджетирование.

Активация Solver надстройки

Прежде чем приступить к поиску решения проблемы с Solver, убедитесь, что надстройка Solver активирована в Excel следующим образом:

  • Нажмите вкладку ДАННЫЕ на ленте. Команда Solver должна появиться в группе «Анализ», как показано ниже.

Активация Solver надстройки

Если вы не можете найти команду Солвера, активируйте ее следующим образом:

  • Нажмите вкладку ФАЙЛ.
  • Нажмите Опции на левой панели. Откроется диалоговое окно «Параметры Excel».
  • Нажмите Надстройки на левой панели.
  • Выберите Надстройки Excel в поле «Управление» и нажмите «Перейти».

Выберите надстройки Excel

Откроется диалоговое окно «Надстройки». Проверьте Надстройку Solver и нажмите Ok. Теперь вы можете найти команду Solver на ленте под вкладкой DATA.

Надстройка Солвера

Методы решения, используемые Solver

Вы можете выбрать один из следующих трех методов решения, которые поддерживает Excel Solver, в зависимости от типа проблемы:

LP Simplex

Используется для линейных задач. Модель Солвера является линейной при следующих условиях:

  • Целевая ячейка вычисляется путем сложения членов формы (изменяющаяся ячейка) * (постоянная).

  • Каждое ограничение удовлетворяет требованию линейной модели. Это означает, что каждое ограничение оценивается путем сложения членов формы (изменяющейся ячейки) * (константы) и сравнения сумм с константой.

Целевая ячейка вычисляется путем сложения членов формы (изменяющаяся ячейка) * (постоянная).

Каждое ограничение удовлетворяет требованию линейной модели. Это означает, что каждое ограничение оценивается путем сложения членов формы (изменяющейся ячейки) * (константы) и сравнения сумм с константой.

Обобщенный редуцированный градиент (GRG) нелинейный

Используется для гладких нелинейных задач. Если ваша целевая ячейка, любое из ваших ограничений или оба содержат ссылки на изменяющиеся ячейки, которые не имеют (изменяющейся ячейки) * (постоянной) формы, у вас есть нелинейная модель.

эволюционный

Используется для гладких нелинейных задач. Если ваша целевая ячейка, любое из ваших ограничений или оба содержат ссылки на изменяющиеся ячейки, которые не имеют (изменяющейся ячейки) * (постоянной) формы, у вас есть нелинейная модель.

Понимание оценки Солвера

Для Солвера требуются следующие параметры –

  • Ячейки с переменными решениями
  • Клетки ограничения
  • Объективные Клетки
  • Метод решения

Оценка решателя основана на следующем:

  • Значения в ячейках переменных решения ограничены значениями в ячейках ограничений.

  • Вычисление значения в целевой ячейке включает значения в ячейках переменных решения.

  • Солвер использует выбранный метод решения, чтобы получить оптимальное значение в целевой ячейке.

Значения в ячейках переменных решения ограничены значениями в ячейках ограничений.

Вычисление значения в целевой ячейке включает значения в ячейках переменных решения.

Солвер использует выбранный метод решения, чтобы получить оптимальное значение в целевой ячейке.

Определение проблемы

Предположим, вы анализируете прибыль, полученную компанией, которая производит и продает определенный продукт. Вас просят найти сумму, которая может быть потрачена на рекламу в следующие два квартала, но не более 20 000. Уровень рекламы в каждом квартале влияет на следующее –

  • Количество проданных единиц, косвенно определяющих сумму выручки от продаж.
  • Сопутствующие расходы и
  • Прибыль

Вы можете приступить к определению проблемы как –

  • Найти стоимость единицы.
  • Найти стоимость рекламы на единицу.
  • Найти цену за единицу.

Определение проблемы

Затем установите ячейки для необходимых расчетов, как указано ниже.

Set Cells

Как вы можете заметить, расчеты сделаны для квартала 1 и квартала 2, которые рассматриваются:

  • Количество единиц, доступных для продажи в квартале 1, составляет 400, а в квартале 2 – 600 (ячейки – C7 и D7).

  • Начальные значения для рекламного бюджета установлены как 10000 за квартал (ячейки – C8 и D8).

  • Количество проданных единиц зависит от стоимости рекламы на единицу и, следовательно, является бюджетом на квартал / Adv. Стоимость за единицу. Обратите внимание, что мы использовали функцию Min, чтобы убедиться, что нет. единиц, проданных в <= нет. из доступных единиц. (Клетки – C9 и D9).

  • Выручка рассчитывается как цена за единицу * Количество проданных единиц (ячейки – C10 и D10).

  • Расходы рассчитываются как стоимость единицы * Количество доступных единиц + Adv. Стоимость за этот квартал (Клетки – C11 и D12).

  • Прибыль – это доход – расходы (ячейки C12 и D12).

  • Общая прибыль – это прибыль за квартал 1 + прибыль за квартал 2 (ячейка – D3).

Количество единиц, доступных для продажи в квартале 1, составляет 400, а в квартале 2 – 600 (ячейки – C7 и D7).

Начальные значения для рекламного бюджета установлены как 10000 за квартал (ячейки – C8 и D8).

Количество проданных единиц зависит от стоимости рекламы на единицу и, следовательно, является бюджетом на квартал / Adv. Стоимость за единицу. Обратите внимание, что мы использовали функцию Min, чтобы убедиться, что нет. единиц, проданных в <= нет. из доступных единиц. (Клетки – C9 и D9).

Выручка рассчитывается как цена за единицу * Количество проданных единиц (ячейки – C10 и D10).

Расходы рассчитываются как стоимость единицы * Количество доступных единиц + Adv. Стоимость за этот квартал (Клетки – C11 и D12).

Прибыль – это доход – расходы (ячейки C12 и D12).

Общая прибыль – это прибыль за квартал 1 + прибыль за квартал 2 (ячейка – D3).

Далее вы можете установить параметры для Солвера, как указано ниже –

Установить параметры

Как вы можете заметить, параметры Солвера –

  • Объективная ячейка – D3, в которой содержится общая прибыль, которую вы хотите максимизировать.

  • Ячейки с переменными решениями – это C8 и D8, которые содержат бюджеты на два квартала – квартал 1 и квартал 2.

  • Есть три ячейки ограничения – C14, C15 и C16.

    • Ячейка C14, которая содержит общий бюджет, должна установить ограничение 20000 (ячейка D14).

    • Ячейка C15, которая содержит номер единиц, проданных в первом квартале, – установить ограничение <= нет. единиц, доступных в Quarter1 (ячейка D15).

    • Ячейка C16, которая содержит номер единиц, проданных в Quarter2, это установить ограничение <= нет. единиц, доступных в квартале 2 (ячейка D16).

Объективная ячейка – D3, в которой содержится общая прибыль, которую вы хотите максимизировать.

Ячейки с переменными решениями – это C8 и D8, которые содержат бюджеты на два квартала – квартал 1 и квартал 2.

Есть три ячейки ограничения – C14, C15 и C16.

Ячейка C14, которая содержит общий бюджет, должна установить ограничение 20000 (ячейка D14).

Ячейка C15, которая содержит номер единиц, проданных в первом квартале, – установить ограничение <= нет. единиц, доступных в Quarter1 (ячейка D15).

Ячейка C16, которая содержит номер единиц, проданных в Quarter2, это установить ограничение <= нет. единиц, доступных в квартале 2 (ячейка D16).

Решение проблемы

Следующим шагом является использование Солвера, чтобы найти решение следующим образом:

Шаг 1 – Перейдите в ДАННЫЕ> Анализ> Решатель на ленте. Откроется диалоговое окно «Параметры решателя».

Параметры решателя

Шаг 2 – В поле «Установить цель» выберите ячейку D3.

Шаг 3 – Выберите Макс.

Шаг 4 – Выберите диапазон C8: D8 в поле « Изменение переменных ячеек» .

Изменение переменных ячеек

Шаг 5 – Затем нажмите кнопку Добавить, чтобы добавить три ограничения, которые вы определили.

Шаг 6 – Откроется диалоговое окно Add Constraint. Установите ограничение для общего бюджета, как указано ниже, и нажмите «Добавить».

Добавить ограничение

Шаг 7 – Установите ограничение для общего номера. единиц, проданных в квартале 1, как указано ниже, и нажмите кнопку Добавить.

Нажмите Добавить

Шаг 8 – Установите ограничение для общего номера. единиц, проданных в квартале 2, как указано ниже, и нажмите кнопку ОК.

Установить ограничение

Появится диалоговое окно «Параметры решателя» с тремя ограничениями, добавленными в поле «Подчинить ограничениям».

Шаг 9 – В поле « Выбрать метод решения» выберите Simplex LP.

Выберите метод решения

Шаг 10 – Нажмите кнопку Решить. Откроется диалоговое окно «Результаты решателя». Выберите Keep Solver Solution и нажмите ОК.

Keep Solver Solution

Результаты появятся в вашем рабочем листе.

Результат

Как вы можете заметить, оптимальное решение, которое дает максимальную общую прибыль с учетом данных ограничений, оказывается следующим:

  • Общая прибыль – 30000.
  • Adv. Бюджет на 1 квартал – 8000.
  • Adv. Бюджет на Квартал2 – 12000.

Пошаговое решение Solver Trial Solutions

Вы можете просмотреть пробные решения Solver, посмотрев результаты итерации.

Шаг 1 – Нажмите кнопку «Параметры» в диалоговом окне «Параметры решателя».

Откроется диалоговое окно « Параметры ».

Шаг 2 – Установите флажок «Показать результаты итерации» и нажмите «ОК».

Показать итерацию

Шаг 3 – Откроется диалоговое окно « Параметры решателя». Нажмите Решить .

Шаг 4 – Появится диалоговое окно « Показать пробное решение », в котором будет отображено сообщение « Солвер остановлен», а текущие значения решения будут отображены на листе .

Показать пробное решение

Как вы можете видеть, текущие значения итерации отображаются в ваших рабочих ячейках. Вы можете либо остановить Солвер, принимая текущие результаты, либо продолжить, пока Солвер не найдет решение на следующих шагах.

Шаг 5 – Нажмите Продолжить.

Диалоговое окно « Показать пробное решение » появляется на каждом этапе, и, наконец, после нахождения оптимального решения открывается диалоговое окно «Результаты решения». Ваш рабочий лист обновляется на каждом шаге, и, наконец, отображаются значения результатов.

Сохранение выбора Солвера

У вас есть следующие варианты сохранения для задач, которые вы решаете с помощью Солвера –

Вы можете сохранить последние выбранные значения в диалоговом окне «Параметры решателя» вместе с рабочим листом, сохранив рабочую книгу.

Каждый лист в книге может иметь свои собственные варианты Солвера, и все они будут сохранены при сохранении книги.

Вы также можете определить более одной проблемы на рабочем листе, каждый из которых имеет свой собственный выбор Солвера. В таком случае вы можете загружать и сохранять проблемы по отдельности с помощью диалогового окна «Параметры решателя» «Загрузить / сохранить».

Нажмите кнопку Загрузить / Сохранить . Откроется диалоговое окно загрузки / сохранения.

Чтобы сохранить модель проблемы, введите ссылку для первой ячейки вертикального диапазона пустых ячеек, в который вы хотите поместить модель проблемы. Нажмите Сохранить.

Модель проблемы (набор параметров решателя) появляется начиная с ячейки, которую вы указали в качестве справочной.

Чтобы загрузить модель проблемы, введите ссылку для всего диапазона ячеек, которые содержат модель проблемы. Затем нажмите на кнопку «Загрузить».

Плагин Excel Solver позволяет найти минимальные и максимальные значения для потенциального расчета. Вот как это установить и использовать.

Существует не так много математических проблем, которые не могут быть решены с помощью Microsoft Excel. Его можно использовать, например, для решения сложных аналитических расчетов «что если» с использованием таких инструментов, как поиск цели, но при этом доступны более эффективные инструменты.

Если вы хотите найти минимальные и максимальные числа, возможные для решения математической задачи, вам необходимо установить и использовать надстройку Solver. Вот как установить и использовать Солвер в Microsoft Excel.

Solver — сторонняя надстройка, но Microsoft включает ее в Excel (хотя по умолчанию она отключена). Он предлагает анализ «что если», чтобы помочь вам определить переменные, необходимые для решения математической задачи.

Например, какое минимальное количество продаж вам нужно совершить, чтобы покрыть стоимость дорогостоящего бизнес-оборудования?

Эта проблема состоит из трех частей: целевого значения, переменных, которые оно может изменить, чтобы достичь этого значения, и ограничений, с которыми должен работать Solver. Эти три элемента используются надстройкой Solver для расчета продаж, которые вы бы хотели выполнить. необходимо покрыть стоимость этого оборудования.

Это делает Solver более продвинутым инструментом, чем собственная функция поиска цели в Excel.

Как включить Солвер в Excel

Как мы уже упоминали, Solver включен в Excel как сторонняя надстройка, но сначала вам нужно включить его, чтобы использовать.

Для этого откройте Excel и нажмите Файл> Параметры открыть меню параметров Excel.

Открытие меню параметров в Excel

в Параметры Excel окно, нажмите Надстройки вкладка для просмотра настроек для надстроек Excel.

Вкладка надстроек Excel

в Надстройки На вкладке вы увидите список доступных надстроек Excel.

Выбрать Надстройки Excel от управлять раскрывающееся меню внизу окна, затем нажмите Идти кнопка.

Управление надстройками Excel

в Надстройки установите флажок рядом с Надстройка Солвера вариант, затем нажмите Хорошо подтвердить.

Включение Excel Solver добавить в

Как только вы нажмете Хорошо, надстройка Solver будет включена, и вы сможете начать ее использовать.

Использование Солвера в Microsoft Excel

Надстройка Solver будет доступна для использования, как только она будет включена. Для начала вам понадобится электронная таблица Excel с соответствующими данными, чтобы вы могли использовать Солвер. Чтобы показать вам, как использовать Солвер, мы будем использовать пример математической задачи.

Исходя из нашего предыдущего предложения, существует электронная таблица, показывающая стоимость дорогостоящего оборудования. Чтобы заплатить за это оборудование, бизнес должен продать определенное количество продуктов, чтобы заплатить за оборудование.

Для этого запроса несколько переменных могут измениться для достижения цели. Вы можете использовать Solver для определения стоимости продукта для оплаты оборудования на основе заданного количества продуктов.

В качестве альтернативы, если вы установили цену, вы могли бы определить количество продаж, которое вам нужно было бы достичь безубыточности — это проблема, которую мы попытаемся решить с помощью Солвера.

Запуск Солвера в Excel

Чтобы использовать Solver для решения этого типа запроса, нажмите Данные вкладка на панели ленты Excel.

Вкладка «Данные» на ленточной панели Excel

в анализировать раздел нажмите решающее устройство вариант.

Кнопка Солвер в Excel

Это загрузит Параметры решателя окно. Отсюда вы можете настроить запрос Солвера.

Выбор параметров решателя

Во-первых, вам нужно выбрать Установить цель клетка. Для этого сценария мы хотим, чтобы доход в ячейке B6 соответствовал стоимости оборудования в ячейке B1, чтобы достичь безубыточности. Исходя из этого, мы можем определить количество продаж, которое нам нужно сделать.

Ячейка Задать цель в Солвере для Excel

к цифра позволяет найти минимум (Min) или максимум (Максимум) возможное значение для достижения цели, или вы можете установить ручную цифру в Значение коробка.

Лучшим вариантом для нашего тестового запроса будет Min вариант. Это потому, что мы хотим найти минимальное количество продаж, чтобы достичь нашей цели безубыточности. Если вы хотите добиться большего, чем это (например, чтобы получить прибыль), вы можете установить целевой показатель дохода в Значение коробка вместо.

Цена остается неизменной, поэтому количество продаж в ячейке B5 является переменная ячейка, Это значение, которое необходимо увеличить.

Вам нужно будет выбрать это в Изменяя переменные ячейки коробка выбора.

Установка переменных Excel Solver

Вы должны будете установить ограничения дальше. Это тесты, которые Solver будет использовать для определения окончательного значения. Если у вас сложные критерии, вы можете установить несколько ограничений для работы Солвера.

Для этого запроса мы ищем номер дохода, который больше или равен первоначальной стоимости оборудования. Чтобы добавить ограничение, нажмите Добавить кнопка.

Добавление ограничения Excel Solver

Использовать Добавить ограничение окно для определения ваших критериев. В этом примере ячейка B6 (показатель целевого дохода) должна быть больше или равна стоимости оборудования в ячейке B1.

После того, как вы выбрали критерии ограничения, нажмите Хорошо или Добавить кнопок.

Добавление ограничения к запросу Excel Solver

Прежде чем вы сможете выполнить свой запрос Solver, вам необходимо подтвердить метод решения, который будет использовать Solver.

По умолчанию это установлено на GRG нелинейный вариант, но есть другие доступные методы решения, Когда вы будете готовы выполнить запрос Солвера, нажмите Решать кнопка.

Окончательные варианты Excel Solver

Запуск Solver Query

Как только вы нажмете РешатьExcel попытается выполнить ваш запрос Солвера. Появится окно результатов, показывающее, был ли запрос успешным.

В нашем примере Solver обнаружил, что минимальное количество продаж, необходимое для соответствия стоимости оборудования (и, следовательно, безубыточности), составило 4800.

Вы можете выбрать Keep Solver Solution вариант, если вы довольны изменениями, внесенными Солвером, или Восстановить исходные значения если нет

Чтобы вернуться в окно «Параметры решателя» и внести изменения в свой запрос, нажмите Вернуться к диалогу параметров решателя флажок.

Окно результатов Excel Solver

щелчок Хорошо чтобы закрыть окно результатов, чтобы закончить.

Работа с данными Excel

Надстройка Excel Solver берет сложную идею и делает ее возможной для миллионов пользователей Excel. Однако это нишевая функция, и вы можете использовать Excel для более простых расчетов.

Вы можете использовать Excel для расчета процентных изменений или, если вы работаете с большим количеством данных, вы можете делать перекрестные ссылки на ячейки в нескольких листах Excel. Вы даже можете вставить данные Excel в PowerPoint, если вы ищете другие способы использования ваших данных.

Понравилась статья? Поделить с друзьями:
  • Using the word adverb in a sentence
  • Using solver tool in excel
  • Using the word actually
  • Using signature in word
  • Using the word acquire