In Excel: enable it under File ▸ Options ▸ Add-ins ▸ Manage: Excel Add-ins ▸ Go ▸ tick Solver Add-in — a Solver button then appears at the right end of the Data tab.
File ▸ Options ▸ Add-ins, set Manage to Excel Add-ins, click Go, tick Solver Add-in, OK. On Mac: Tools ▸ Excel Add-ins.
Build the model so one cell computes the objective from the cells Solver is allowed to change.
Data ▸ Analyze ▸ Solver. Set Objective to that cell and pick Max, Min or Value Of.
Set "By Changing Variable Cells" to the input cells — they must be values, not formulas.
Add constraints one at a time with the Add button; use int or bin in the operator list for whole-number or yes/no decisions.
Pick the solving method: Simplex LP for a linear model, GRG Nonlinear for smooth curves, Evolutionary when the model contains IF or lookups.
Click Solve, then choose Keep Solver Solution and optionally produce the Answer and Sensitivity reports.
Need it as an auditable file?
Ships inside the linked template — formula-driven, unlocked, audit-ready.
What this does
Solver is an optimiser: you give it a target cell, a set of cells it may change, and constraints, and it finds the values that maximise, minimise or hit a target. It ships with Excel but is off by default. It goes further than Goal Seek, which changes one input to hit one target with no constraints. Three solving methods are offered: Simplex LP for linear problems (fastest and guaranteed optimal), GRG Nonlinear for smooth curved ones, and Evolutionary for problems with IF, VLOOKUP or other non-smooth logic. Choosing Simplex LP on a nonlinear model produces an error; choosing GRG on a nonlinear model finds a local optimum that depends on the starting values. Keep the inputs visible and clearly labelled and the whole thing stays auditable — anyone who opens the file later, including you, can see at a glance exactly what feeds the result and change one assumption without hunting through the formula. For “use excel solver”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected cells change, and only then apply the same setup to the full sheet. When this is a ribbon command, the selection matters more than the button: confirm the range, apply the command, then spot-check the output before saving. That is what makes a calculation you can defend to a CFO or an auditor useful in real work: repeatable, auditable, and not dependent on memory or luck.
A worked example
A production mix: profit per unit in B2:C2, hours per unit in B3:C3, total hours available 400 in E3. Units to make sit in B5:C5 (currently 0) and total profit in E5 as =SUMPRODUCT(B2:C2,B5:C5). Data ▸ Solver ▸ Set Objective: $E$5 ▸ To: Max ▸ By Changing Variable Cells: $B$5:$C$5 ▸ Add constraints: $E$3<=400 and $B$5:$C$5>=0, tick "Make Unconstrained Variables Non-Negative" ▸ Select a Solving Method: Simplex LP ▸ Solve. Solver writes the optimal units into B5:C5. Product mix, staff rostering, blending, transport routing and portfolio allocation are all the same shape of problem, and Solver answers them in one dialog instead of a week of trial and error. A practical tip before you scale it up: build it once on a small block of test data, confirm the number against the tool on this page, and only then point it at your real sheet. That one habit catches almost every mistake while it is still cheap to fix, long before a wrong figure reaches a report or a colleague.
In Google Sheets
If you are in Google Sheets rather than Excel, the good news is that the formula shown here is identical and the workflow barely changes — menus sit across the top instead of in a ribbon, and a few function names differ slightly, but anything you build here moves across with little or no rework. Nothing on this page is behind a login: the tool runs entirely in your browser, the formula is shown in full with one-click copy, and the steps work the same on Windows and Mac. That is the whole promise here — the exact answer, a way to prove it on your own numbers, and just enough context to make it stick. Here is the takeaway for “use excel solver”: copy the answer if you are busy, but if you have a spare few minutes, rebuild the example in Excel yourself with the tool above open beside it. That single pass — type it, run it, watch the result move when you change an input — is what turns a formula you found into a technique you trust. Keep your inputs labelled and referenced, never hard-coded, and the same sheet stays correct and auditable as it grows. Done that way, you will not need to look this up again, and you will be the person others ask.
Common mistakes
- Putting a formula in a changing cell — Solver overwrites it with a number and the model breaks.
- Choosing Simplex LP for a model containing
IF,MAXor a lookup, which reports that the linearity conditions are not satisfied. - Leaving out a non-negativity constraint and getting an "optimal" answer that makes minus 300 units.
- Accepting a GRG Nonlinear result as the global optimum; it finds a local one, so re-run from different starting values.
- Expecting Solver in Excel for the web or on mobile, where the add-in does not exist.
Frequently asked questions
How do I add Solver to Excel?
File ▸ Options ▸ Add-ins ▸ set Manage to Excel Add-ins ▸ Go ▸ tick Solver Add-in ▸ OK. On Mac use Tools ▸ Excel Add-ins. The button appears on the Data tab.
What is the difference between Solver and Goal Seek?
Goal Seek changes one input to make one cell hit one value, with no constraints. Solver changes many inputs, respects constraints, and can maximise or minimise rather than only hitting a target.
Which solving method should I pick?
Simplex LP when the objective and constraints are all linear — it is fastest and gives the true optimum. GRG Nonlinear for smooth curved models. Evolutionary when the model uses IF, MAX, MIN or lookups.
Why does Solver say the linearity conditions are not satisfied?
The model contains something non-linear — often an IF, a lookup or a multiplication of two changing cells — while Simplex LP is selected. Switch to GRG Nonlinear or Evolutionary.
Other ways people ask this
On the way here you may have searched this as “how to use the solver in excel”, “using solver in excel”, “solver formula excel” and “excel formula solver” — it is all the same task, and this page is the single, complete answer to it.
Platform & version notes
- If you are on a Mac, nothing here changes except the modifier key: swap Ctrl for ⌘ in every shortcut, and use the Windows/Mac toggle at the top of the page so the keystrokes shown match the keyboard in front of you.
How is it different on a Mac?
Only the keys. Press ⌘ where Windows uses Ctrl; the menus, formulas and result for "use excel solver" are the same on macOS as on Windows.
Why do people search for this in so many different ways?
Because the same task has many names. “how to use the solver in excel”, “using solver in excel”, “solver formula excel” all point at the one operation explained on this page, which is why they all lead here.