Solver is a built-in Excel tool you activate through the Add-ins menu

Solver is a feature in Excel that finds the best answer to a problem by testing different values. It comes with Excel but is turned off by default, so you have to switch it on before you can use it. Once activated, Solver appears as a button in the Data tab on your ribbon.

The tool is useful when you have a formula that depends on several changing numbers and you want to find what those numbers should be to reach a specific goal. For example, you might use Solver to figure out what price and quantity combination gives you the highest profit, or what budget allocation across departments stays within a spending limit.

Key Takeaways

  • Solver is disabled by default in Excel and must be turned on through File > Options > Add-ins > Manage: Excel Add-ins.
  • After activation, Solver appears as a button in the Data tab, in the Analyze group on the right side of the ribbon.
  • You set up Solver by choosing a target cell with a formula, deciding whether to maximize or minimize it, and naming the cells that can change.
  • Solver works by testing different values in your changing cells until it finds the combination that reaches your goal.

How to activate Solver in Excel

Open Excel and go to File in the top left. Click Options at the bottom of the menu. In the Options window, select Add-ins from the left sidebar.

At the bottom of the Add-ins window, you will see a dropdown that says "Manage:" with "Excel Add-ins" selected. Click the Go button next to it. A dialog box will open showing available add-ins. Check the box next to Solver Add-in and click OK. Solver is now active and will stay on until you turn it off the same way.

If you do not see Solver Add-in in the list, your version of Excel may not include it. Solver comes with Excel 2010 and later on Windows, and Excel 2011 and later on Mac. If you have an older version or are using Excel Online, Solver is not available.

Where to find Solver after you turn it on

Once Solver is activated, click the Data tab on your ribbon. On the far right side, in a group labeled Analyze, you will see a Solver button. Click it to open the Solver dialog box.

If you do not see the Analyze group, your ribbon may be collapsed or customized. You can also reach Solver by pressing Alt + T on Windows (or Cmd + T on Mac) if you have the Data tab active, though this shortcut varies by Excel version.

Setting up a Solver problem

Before you open Solver, build your spreadsheet with three things: a target cell that holds a formula, cells that can change (your variables), and any constraints (limits on what values are allowed).

For example, imagine you sell two products and want to know how many of each to make to maximize profit. Your target cell might be D5, which contains a formula that calculates total profit based on quantity and price. Your changing cells might be B2 and B3 (quantity for product A and product B). A constraint might be that you cannot spend more than $10,000 on materials.

Open the Solver dialog. In the "Set Objective" field, click the target cell (the one with your formula). Choose whether you want to Maximize, Minimize, or reach a specific Value. In the "By Changing Variable Cells" field, enter the cells that Solver is allowed to adjust. If you have constraints, click Add and enter each one — for instance, "B2 must be less than or equal to 100" or "C4 must equal 50."

Running Solver and reading the results

Once you have set your objective, changing cells, and constraints, click Solve. Solver will test many combinations of values and show you the best answer it found. A dialog will appear asking whether you want to keep the solution or restore your original values.

If Solver finds a solution, it will fill your changing cells with the values that reach your goal. If it cannot find a solution that meets all your constraints, it will tell you that. This usually means your constraints are impossible to meet together, or you need to adjust them.

You can also choose a solving method at the bottom of the Solver dialog. The default is GRG Nonlinear, which works for most problems. If your spreadsheet uses only simple addition, subtraction, and multiplication with no complex functions, Simplex LP is faster. Leave the method as GRG Nonlinear unless you have a reason to change it.

Common reasons Solver does not work

If Solver will not open or the button does not appear, the add-in may not have activated correctly. Go back to File > Options > Add-ins, click Go, and make sure the Solver Add-in checkbox is checked. If it is grayed out, your Excel version does not include Solver.

If Solver opens but cannot find a solution, check that your target cell contains a formula, not just a number. Solver also needs at least one changing cell. If you have entered constraints, verify that they are not contradictory — for instance, asking a cell to be both greater than 100 and less than 50 at the same time.

If Solver finds a solution but it seems wrong, double-check your formulas in the target cell and your constraints. Solver is accurate only if your spreadsheet logic is correct. Test by entering values by hand to see if the target cell calculates what you expect.

Frequently Asked Questions

Does Solver work in Excel Online?

No. Solver is not available in Excel Online or in Excel for iPad. You need the desktop version of Excel (Windows or Mac) to use Solver. If you use Excel Online, you can download your file, open it in desktop Excel, use Solver, and save the results back to your cloud storage.

Can I save my Solver setup so I do not have to enter it again?

Yes. After you set up your Solver problem, click Save Model in the Solver dialog. Choose a range of empty cells where Solver can store your settings. Later, open Solver, click Load Model, and select those cells to reload your objective, changing cells, and constraints.

What is the difference between Solver and Goal Seek?

Goal Seek is simpler and changes only one cell to reach a target. Solver changes multiple cells at once and can handle constraints. Use Goal Seek if you have one variable to adjust; use Solver if you have several and need to set limits on them.

Why does Solver give me a different answer each time I run it?

Solver uses trial-and-error methods that can find different local solutions depending on where it starts. If you want consistent results, enter your best guess for the changing cells before running Solver, or try the Simplex LP method instead of GRG Nonlinear if your problem is linear.