Excel Problem Solver: How to Set Up Solver

How-to basics · Updated November 21, 2026

Yes. Excel’s Problem Solver is the Solver add-in: it finds values for selected cells that maximize, minimize, or reach a target in a formula cell while meeting constraints you specify. To use it in desktop Excel, enable the add-in, then choose Data > Solver to define the objective, changing cells, and limits.

What Excel Solver Does

Solver is an optimization tool, not a general-purpose error checker or a feature that automatically repairs a broken workbook. You give it a mathematical model: a formula to optimize, cells it is allowed to change, and rules those cells must obey. Solver searches for a set of values that satisfies the rules and improves the objective.

For example, a business might want to choose how many units of several products to make to earn the highest profit without exceeding available labor or materials. The quantities are the decision variables, total profit is the objective, and labor and material limits are constraints. Solver changes the quantities and recalculates the formulas until it finds a suitable solution.

The result depends on the model, its starting values, and the solving method. Solver does not know whether a proposed plan is sensible in the real world unless you represent the relevant requirements in the worksheet. A missing capacity limit, incorrect unit, or omitted cost can make a mathematically valid answer unusable.

When Solver Is Useful

Solver is useful when several inputs affect an outcome and the inputs are subject to limits. Common applications include production planning, staff scheduling, delivery allocation, blending ingredients to meet specifications, and selecting a product mix. It can also help allocate a fixed budget across activities when the objective and restrictions can be expressed with worksheet formulas.

A useful test is whether the question can be stated as: “Which values in these cells produce the best result in this formula, while obeying these rules?” If the task is simply to find one input that makes one formula equal a chosen number, Goal Seek is usually simpler. If the question involves multiple changing inputs or several limits, Solver is a better fit.

Solver works with a model, not a plain-language request. For instance, it cannot infer that staff should not work consecutive night shifts, that a recipe must taste good, or that a delivery plan should avoid a particular road. Such requirements must be represented as formulas or constraints, and some qualitative requirements may not be easy to model at all.

Enable Solver in Excel for Microsoft 365

In Excel for Microsoft 365 on Windows, Solver is an add-in that may need to be turned on. Open File > Options > Add-ins. At the bottom, set the Manage list to Excel Add-ins and select Go. Check Solver Add-in, then select OK. If Excel prompts to install or load it, follow the prompt. Solver should then appear on the Data tab, usually in the Analyze group.

On a Mac, open Tools > Excel Add-ins, select Solver Add-in, and choose OK. The command is available from the Data tab when the add-in is enabled. Ribbon placement can vary slightly with window size and Excel updates. Excel for the web does not run the desktop Solver add-in; open the workbook in the desktop app to use it.

If Solver is missing after you enable it, revisit the add-in list and confirm that Solver Add-in is checked. In a managed work or school installation, an administrator may restrict add-ins. If the command is unavailable or loading fails, check with the organization’s IT support or use an approved desktop installation.

Set Up a Solver Model

Before opening Solver, make sure the worksheet has formulas for the outcome and resource use, and separate cells for the values Solver may change. Keep units consistent: do not combine hours with minutes or dollars with cents without converting them. Then select Data > Solver and set the model:

  1. In Set Objective, select the formula cell that measures the result you want to improve.
  2. Choose Max to seek the largest result, Min for the smallest, or Value Of to target a particular number.
  3. In By Changing Variable Cells, select the cells Solver is allowed to adjust.
  4. Use Add to enter constraints, such as resource use being less than or equal to capacity, or decision cells being integers.
  5. Choose a solving method that suits the model, then select Solve. Review the result and choose whether to keep the solution or restore the original values.

Do not include cells containing labels or formulas among the changing cells. Solver should adjust inputs; formulas should calculate the consequences. Save a copy before experimenting, particularly in a complex workbook, because accepting a result changes the decision-variable cells.

Worked Example: Choosing a Product Mix

Suppose Product A earns $30 per unit and uses two labor hours and one unit of material. Product B earns $20 per unit and uses one labor hour and two units of material. The business has 100 labor hours and 80 material units. Put product names in A2:A3; unit profit in B2:B3; labor per unit in C2:C3; material per unit in D2:D3; and quantities in E2:E3. Use E2:E3 as the changing cells.

With profits in B2:B3 and quantities in E2:E3, enter this formula in B5 to calculate total profit:

=SUMPRODUCT(B2:B3,E2:E3)

With labor requirements in C2:C3 and quantities in E2:E3, enter this formula in C5 to calculate labor used:

=SUMPRODUCT(C2:C3,E2:E3)

With material requirements in D2:D3 and quantities in E2:E3, enter this formula in D5 to calculate material used:

=SUMPRODUCT(D2:D3,E2:E3)

In Solver, set B5 as the objective and choose Max. Set E2:E3 as the changing cells. Add constraints C5 <= 100 and D5 <= 80, and require E2:E3 to be nonnegative. If products must be made in whole units, also add an integer constraint for E2:E3. For this example, a solution is 40 units of A and 20 of B: profit is 40 × $30 + 20 × $20 = $1,600, labor use is 40 × 2 + 20 × 1 = 100 hours, and material use is 40 × 1 + 20 × 2 = 80 units. Both resource limits are met exactly.

This small example also shows why the formulas matter. If the labor formula accidentally uses the material column, Solver may still return a result, but it will optimize the wrong model. Check the formulas, units, constraints, and returned values before treating the answer as a usable plan.

Choose a Solving Method

The Solver Parameters dialog offers methods suited to different kinds of models. The right choice depends on how the objective and constraints respond when the changing cells move:

  • Simplex LP: Use this for linear models, where changing an input has a proportional effect and formulas do not introduce nonlinear relationships. A product-mix model with fixed per-unit profits and resource use is typically linear.
  • GRG Nonlinear: Use this for smooth nonlinear models, such as formulas involving curved relationships. It can find a local solution, so a result may depend on starting values and may not be the best solution across every possible region.
  • Evolutionary: Consider this for models with discontinuities or relationships that are not smooth, including some models with IF-based logic. It searches in a different way and can take longer; results may need careful checking.

When a model is linear, selecting Simplex LP is generally more appropriate than using a nonlinear method. If Solver reports that it cannot find a feasible solution, check whether the constraints conflict or whether the changing cells have appropriate bounds. A solver message is information about the model and search, not proof that the real-world problem has no workable answer.

Constraints, Integer Values, and Model Quality

Constraints express what is allowed. Common examples are a resource-use formula less than or equal to available capacity, a minimum production requirement, or a decision cell that must be nonnegative. Solver can also apply integer or binary restrictions when a choice must be a whole number or a yes/no value. These restrictions can make a model harder to solve, so add them only when they reflect a genuine requirement.

Be precise about what a constraint means. If a budget is $10,000, a spending formula should be constrained to be at most 10,000 using the same currency units. If a cell stores hours but the capacity is entered in minutes, convert one side before comparing them. Also distinguish a limit that must be met from a preference: a strict operational requirement belongs in the constraints, while a preference may be better represented in the objective if it can be measured appropriately.

Test a model with simple, manually chosen values before solving. Check that changing a decision cell changes the intended formulas and that each resource calculation gives an understandable result. After Solver finishes, verify every constraint and recalculate the objective from the returned values. Keep notes on assumptions, such as whether quantities can be fractional and which costs are included, so another person can interpret the result.

Limits and Common Problems

Solver only optimizes the formula and restrictions you give it. It does not validate source data, identify every missing assumption, or guarantee a globally best answer for every nonlinear problem. Some models may have no feasible combination; others may have several equally good solutions. Nonlinear searches can settle on a local result, and integer restrictions can increase the search effort.

If Solver returns an unexpected answer, check these common issues:

  • The objective cell is a fixed number or text rather than a formula affected by the changing cells.
  • The wrong range is selected as the changing cells, or the range includes formulas that should remain intact.
  • A constraint points to the wrong cell, uses the wrong inequality, or compares values in different units.
  • Decision cells need nonnegative, integer, or upper-bound restrictions that were not added.
  • The selected method does not fit the formulas, or starting values make a nonlinear search difficult.

Try solving a smaller version of the model if the full one is hard to diagnose. Temporarily simplify formulas or remove a nonessential constraint, then add pieces back and observe when the result changes. Do not interpret a successful Solve message as a guarantee that every business or operational condition has been captured.

Solver Compared with Other Excel Tools

Goal Seek adjusts one input cell to make one formula reach a target. It is appropriate for a question such as “What sales volume makes this profit formula equal $5,000?” It does not provide Solver’s multi-variable, multi-constraint optimization setup.

Data Tables show how one or two inputs affect formula results across a range of values. They are useful for sensitivity analysis, such as comparing profit at several prices and quantities, but they do not select an optimum subject to a set of constraints. For a larger optimization model, Solver may be the right tool; for comparing scenarios, a Data Table may be clearer.

For more complex optimization, organizations sometimes use specialized add-ins or dedicated optimization software. Such tools may offer capabilities beyond Excel’s built-in Solver, but they involve separate product, compatibility, and licensing considerations. First decide whether the model’s scale and requirements exceed what the installed Solver add-in can handle.

Frequently Asked Questions

Is Excel Solver free?
Solver is an add-in included with many desktop Excel installations and does not require buying a separate Solver add-in for basic use. Availability can depend on the Excel installation and organization settings. Third-party optimization products may have separate fees.

Where is Solver in Excel?
After enabling Solver, look on the Data tab in desktop Excel. On Windows, enable it through File > Options > Add-ins, then choose Excel Add-ins and Go. On Mac, use Tools > Excel Add-ins.

Can Excel Solver work with more than one changing cell?
Yes. Solver can adjust multiple changing cells, subject to the limits of the installed Solver version and the model. Select the decision-variable range in By Changing Variable Cells and make sure the objective formula depends on those cells.

Why does Solver say there is no feasible solution?
Constraints may contradict one another, a limit may be too restrictive, or a formula or cell reference may be wrong. Check the model with simple input values, verify units and inequality signs, and confirm that the changing cells can actually affect the constrained formulas.

Does Solver work in Excel for the web?
The desktop Solver add-in is not supported in Excel for the web. Open the workbook in the Excel desktop application to enable and use Solver.

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.