Excel Solver: Setup, Optimization Models, and Fixes

How-to basics · Updated November 21, 2026

Excel has a Solver add-in, but there is no standard Excel feature formally called a “Solver block.” Solver helps find values for selected cells that maximize, minimize, or reach a target in another cell while meeting constraints; on Microsoft 365 for Windows, enable it through File > Options > Add-ins, then choose Excel Add-ins and click Go.

What “Solver” Means in Excel

Solver is an optimization tool for spreadsheet models. You provide a formula for an objective, identify the cells Solver may change, and optionally set rules those values must satisfy. Solver then searches for values that produce the best permitted result. For example, a business might seek the most profitable product mix given limited labor and materials, or a planner might minimize delivery cost while meeting demand.

Solver is an add-in, not a normal worksheet function such as SUM, and it does not add a special block of cells to a sheet. Its input cells and formulas can be arranged in any suitable part of a workbook. The familiar “block” in some questions may simply mean the group of cells used for a Solver model. Those cells are ordinary worksheet cells; Solver’s settings identify how they relate to the model.

Solver is also different from Goal Seek. Goal Seek changes one input to make a formula reach one specified value. Solver can change multiple decision cells, optimize an outcome, and apply constraints such as limits, minimums, or integer requirements.

How to Enable Solver in Excel for Windows

In Microsoft Excel for Microsoft 365 on Windows, Solver may need to be enabled once for the current installation. Follow these steps:

  1. Open Excel and choose File > Options.
  2. Select Add-ins.
  3. At the bottom, beside Manage, select Excel Add-ins, then click Go.
  4. Check Solver Add-in and click OK. If Excel asks to install the add-in, approve the prompt.
  5. Open the Data tab and look for Solver, usually in the Analysis group.

If Solver is already checked but does not appear, close and reopen Excel, then check the Add-ins list again. If the add-in is absent from the list or an organization-managed installation prevents it from loading, an administrator may need to repair or enable the Office installation. Avoid downloading an unfamiliar file that claims to be an Excel Solver installer; the standard add-in is provided through Excel.

Enabling Solver makes the command available; it does not automatically create a model or change worksheet data. Solver settings are configured separately for each problem. Save the workbook after building a model so the sheet and its formulas are preserved, and review the Solver Parameters window when reopening it.

Build a Model: Objective, Variables, and Constraints

A useful Solver model has three core parts. The objective is a cell containing a formula to maximize, minimize, or set to a particular value. The variable cells, sometimes called changing cells, contain the values Solver is allowed to adjust. Constraints describe acceptable limits for those cells or for formulas calculated from them.

For a product-planning model, the decision cells could hold the number of units to make. A profit formula would be the objective, while formulas for hours used and materials consumed would be constrained by available capacity. A constraint can also require a decision cell to be nonnegative, whole-number, or binary. A binary restriction limits a cell to 0 or 1, useful for yes/no choices such as whether to open a facility.

  • Objective: What result should improve, such as profit, cost, time, or distance?
  • Changing cells: Which numbers can Solver choose?
  • Constraints: What limits or rules must remain true?
  • Formulas: Do the objective and constraint cells correctly calculate the consequences of the choices?

Solver optimizes the formulas and relationships in the workbook; it cannot infer missing business rules or correct an incorrect formula. A model that leaves out a cost, capacity limit, or required minimum can return a mathematically valid answer that is unsuitable for the real situation.

Worked Example: Choosing a Product Mix

Suppose a small workshop makes products X and Y. Each unit of X earns $30 and uses two labor hours and three units of material. Each unit of Y earns $50 and uses four labor hours and two units of material. The workshop has 40 labor hours and 30 units of material. The example treats production as continuous, so Solver may return fractional quantities; a later section explains whole-number decisions.

Set up the sheet with product names in B1:C1, quantities in B2:C2, profit per unit in B3:C3, labor hours per unit in B5:C5, and material per unit in B7:C7. Enter 30 and 50 in B3:C3, 2 and 4 in B5:C5, and 3 and 2 in B7:C7. Put labels in column A for the quantities, total profit, labor used, and material used.

With quantities in B2:C2 and profit per unit in B3:C3, enter this formula in B4 to calculate total profit:

=SUMPRODUCT(B2:C2,B3:C3)

With the decision quantities in B2:C2 and labor requirements in B5:C5, enter this formula in B6 to calculate labor used:

=SUMPRODUCT($B$2:$C$2,B5:C5)

With the same decision quantities in B2:C2 and material requirements in B7:C7, enter this formula in B8 to calculate material used:

=SUMPRODUCT($B$2:$C$2,B7:C7)

Choose Data > Solver. Set the objective to B4 and select Max. Set the variable cells to B2:C2. Add constraints that B6 is less than or equal to 40, B8 is less than or equal to 30, and B2:C2 is greater than or equal to 0. Select Simplex LP as the solving method because this example uses linear formulas and constraints, then click Solve.

One optimal continuous solution is 5 units of X and 7.5 units of Y. It uses 40 labor hours and 30 material units, and the profit formula returns $525: 5 × $30 plus 7.5 × $50. Both resource limits are fully used. If the products must be made only in whole units, add an integer constraint for B2:C2 and solve again; the result can differ because that changes the model.

Choose the Right Solving Method

The solving method matters because different kinds of models require different search approaches. Solver offers methods suited to linear, smooth nonlinear, and more irregular problems. Choose based on the formulas and relationships in the model, not simply on which option appears first.

  • Simplex LP: Use for linear models, where the objective and constraints are linear combinations of decision cells. The product example above is linear.
  • GRG Nonlinear: Use for many smooth nonlinear models, such as those involving multiplication between changing values or smooth curves. A nonlinear model may have more than one local optimum, so the returned result may depend on its starting values.
  • Evolutionary: Consider for models with discontinuities, IF-based decision logic, or other relationships that make standard smooth optimization unsuitable. It searches more broadly and may take longer; results can depend on settings and available time.

If a linear model is mistakenly sent to a nonlinear method, it may still produce an answer, but that does not make the model easier to validate. Conversely, Simplex LP is not a general-purpose choice for every workbook. Check Solver’s result message and test whether the suggested values meet the original requirements.

Run Solver and Understand the Result

After configuring the objective, changing cells, constraints, and method in the Solver Parameters window, click Solve. Excel displays a results message when it finishes. You can keep the solution in the worksheet or restore the original values. Choose reports if you need additional detail about a supported model and result; report options depend on the type of problem solved.

A Solver result is a recommendation within the model, not a guarantee that the assumptions are correct. Check the resulting decision cells and recalculate the objective and constraints independently. For the product example, verify that total hours do not exceed 40, material use does not exceed 30, and the profit matches the quantities shown. If there are multiple equally good solutions, Solver may return one of them rather than listing every alternative.

For a model that includes integer decisions, confirm that the relevant cells are whole numbers and that the returned solution satisfies all limits. If Solver reports that it could not find a feasible solution, inspect whether the constraints conflict. For instance, a minimum production requirement might demand more hours than the workbook’s available capacity.

Common Problems and Practical Checks

  • Solver is missing: Confirm the Solver Add-in is checked under File > Options > Add-ins > Manage: Excel Add-ins > Go. Restart Excel if needed.
  • The result looks implausible: Check units, formulas, and omitted constraints. A model may maximize profit without considering a cost if that cost is absent from the objective.
  • Solver says no feasible solution exists: Review constraints for contradictions, mistaken cell references, and incorrect inequality directions. Temporarily testing a simpler version can help identify the conflicting rule.
  • The solution contains fractions: Add an integer constraint only when the decision genuinely must be whole-number. Integer restrictions can make a problem harder to solve and can reduce the best achievable objective.
  • The result changes between runs: Nonlinear or evolutionary searches may be sensitive to starting values or search settings. Compare results and check whether the model has multiple possible optima.
  • Solver stops without a satisfactory answer: Recheck the selected method, formulas, constraints, and Solver options. A time or iteration limit can also prevent a search from finishing.

Use simple, auditable formulas where practical and label units beside input cells. Keep a copy of important starting values before solving if you need to compare scenarios. Solver changes the selected variable cells when you keep its solution, so a saved starting point or duplicate worksheet makes comparisons easier.

Windows, Mac, and Excel for the Web

The steps above apply to Excel for Microsoft 365 on Windows. In Excel for Mac, use Tools > Excel Add-ins, select Solver Add-in, and confirm the selection; the command is then available from the Data tab. Ribbon placement and dialog appearance can differ slightly by platform or update, but the objective, variable cells, constraints, and solving methods have the same basic purpose.

Excel for the web does not run the desktop Solver add-in in the same way. If a workbook contains a Solver model, open it in the desktop Excel application to configure or run the add-in. A workbook can still be viewed or edited in a browser, but do not assume that the browser version can perform the optimization merely because Solver settings or results are present in the file.

When to Use an Alternative

Goal Seek is a simpler option when there is one input cell and one target formula value. In desktop Excel, find it through Data > What-If Analysis > Goal Seek. For example, it can find the sales amount needed to reach a specified profit, but it does not handle a collection of resource constraints and multiple changing cells like a Solver model.

For a very small problem, manual scenario comparisons or a clearly designed worksheet may be enough. For larger optimization problems or requirements beyond the built-in add-in, specialized optimization software may be appropriate. OpenSolver is a separate third-party Excel add-in, not part of the standard Solver feature; check its current documentation, compatibility, and download source before using it. In any tool, validate the model and preserve a copy before changing important workbook data.

Frequently Asked Questions

Is Solver already in Excel?
Solver is included as an Excel add-in, but it may not be enabled. On Windows, enable it through File > Options > Add-ins, choose Excel Add-ins beside Manage, click Go, and check Solver Add-in.

Where is Solver in Excel?
After enabling the add-in, look on the Data tab, usually in the Analysis group. If the command is not there, check that the add-in is enabled and restart Excel.

What is a Solver block in Excel?
Excel does not have a standard feature named “Solver block.” People may use that phrase informally for the cells in an optimization model. Solver uses ordinary worksheet cells for its changing values, objective formula, and constraints.

Can Solver change more than one cell?
Yes. The By Changing Variable Cells field can identify multiple decision cells, subject to Solver’s supported model limits. Those cells should represent the decisions the model is allowed to make.

Why can’t I use Solver in Excel online?
The desktop Solver add-in is not available to run in Excel for the web as it is in desktop Excel. Open the workbook in Excel for Windows or Mac to configure and run Solver.

What is the difference between Solver and Goal Seek?
Goal Seek adjusts one input cell to make a formula reach a chosen value. Solver can optimize an objective by changing multiple cells and can enforce constraints on those decisions or their calculated results.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.