Solver is built into Excel but turned off by default
Solver is a tool inside Excel that finds the best answer to a problem by testing different numbers. It comes with Excel, but you have to turn it on first — it does not appear in your ribbon until you do. Once it is on, you can use it to answer questions like "what price gives me the most profit" or "what combination of ingredients meets my budget."
Solver works by changing the numbers in certain cells until it reaches a goal you set. For example, you could tell it to change your product quantities until total profit hits $10,000, or change your budget split until you stay under $5,000 total. It is faster than guessing or building separate scenarios by hand.
Key Takeaways
- Solver lives in the Data tab on the ribbon after you turn it on through File > Options > Add-ins.
- You need three things to set up Solver: a target cell with a formula (the goal), variable cells that Solver can change, and constraints that set limits.
- Solver works best when your spreadsheet is already set up with formulas that link your inputs to your result.
- If Solver does not find an answer, it usually means your problem is set up in a way that has no solution, or the constraints are too tight.
How to turn Solver on in Excel
Solver is an add-in, which means it is extra software that sits inside Excel but does not load automatically. To turn it on, open Excel and go to File in the top left. Click Options at the bottom of the menu.
In the Options window, click Add-ins on the left side. At the bottom of the window, you will see a dropdown that says "Manage:" — make sure it says "Excel Add-ins" next to it. Click the Go button. A small window will pop up with a list of add-ins. Look for Solver Add-in and check the box next to it, then click OK. Close the Options window.
Solver is now on. Go to the Data tab on your ribbon at the top of the screen. On the right side of the ribbon, you should see a button labeled Solver. If you do not see it, close Excel completely and open it again — sometimes the ribbon does not refresh until you restart.
Setting up your spreadsheet before you use Solver
Solver needs your spreadsheet to be built a certain way to work. You need a target cell — a cell with a formula that shows your goal (like total profit or total cost). You also need variable cells — the cells Solver is allowed to change to reach your goal (like quantity or price). Finally, you need constraints — rules that limit what Solver can do (like "quantity cannot be more than 100").
Before you open Solver, build your spreadsheet with these pieces in place. For example, if you are trying to find the best price for a product, you might have a cell for quantity, a cell for price per unit, a cell that multiplies them together to get total revenue, and a cell that subtracts costs to show profit. Solver would then change the price cell until profit reaches your target.
Make sure all your formulas are correct before you start. Solver will only be as good as the math you give it. If your formula is wrong, Solver will find the "best" answer to the wrong problem.
How to set up and run Solver
Click the Solver button on the Data tab. The Solver window will open. At the top, you will see "Set Objective:" — click in that box and then click the cell that holds your goal (your target cell with the formula). This is the number you want Solver to maximize, minimize, or set to a specific value.
Below that, choose what you want Solver to do: click the radio button next to Max to find the highest possible value, Min to find the lowest, or Value Of if you want to hit a specific number. If you choose "Value Of," type the number you want in the box next to it.
Next, click in the "By Changing Variable Cells:" box and select the cells Solver is allowed to change. These are usually the cells that hold your inputs — price, quantity, budget split, or whatever you want Solver to adjust. You can click one cell, or drag to select multiple cells.
In the "Subject to the Constraints:" section, click Add to set limits. A small window will pop up. Click in the first box and select a cell you want to constrain. In the middle dropdown, choose a condition: <= (less than or equal to), = (equal to), >= (greater than or equal to), or others. In the third box, type the limit or click a cell that holds it. Click Add to add another constraint, or OK when you are done.
Once your constraints are set, click the Solve button. Solver will run and show you the answer it found. If it found a solution, you will see a window asking whether you want to keep the answer or go back to your original numbers. Click Keep Solution to accept it, or Restore Original Values to undo it.
What to do if Solver cannot find an answer
Sometimes Solver will tell you it cannot find a solution. This usually means one of three things: your constraints are impossible to meet at the same time, your problem is set up in a way that has no answer, or Solver needs more time to search. Check your constraints first — make sure they do not contradict each other. For example, if you tell Solver to maximize profit but also keep price below $5 and costs are $10, there is no solution.
If your constraints make sense, try changing the Solver engine. Click Solver again, then click the dropdown that says "Select a Solving Method:" and try GRG Nonlinear or Evolutionary instead of the default. Different engines work better on different types of problems. Run Solver again and see if it finds an answer.
If Solver still cannot find a solution, your spreadsheet may need to be rebuilt. Make sure your target cell actually depends on your variable cells through formulas — if they are not connected, Solver cannot change one to affect the other. Check that all your formulas are correct and that you have selected the right cells.
Common mistakes when using Solver
The most common mistake is forgetting to set up formulas before running Solver. If your target cell is just a number you typed in, not a formula, Solver cannot change it. Make sure your target cell has a formula that depends on your variable cells.
Another mistake is selecting the wrong variable cells. Solver can only change the cells you tell it to change. If you want Solver to adjust price and quantity, you have to select both cells in the "By Changing Variable Cells" box. If you only select price, Solver will only change price.
A third mistake is setting constraints that are too tight or contradictory. If you tell Solver to maximize profit but also keep price at exactly $10, and that price does not give you the maximum profit, Solver cannot solve it. Loosen your constraints or remove the ones that are not essential.
Frequently Asked Questions
Can I use Solver on a Mac version of Excel?
Yes, but the steps are slightly different. Go to Tools in the menu bar instead of File, then look for Add-ins. The Solver window itself works the same way once it is turned on. If you cannot find Solver in Tools, your version of Excel may not include it — check the Microsoft Office version number.
What is the difference between the three solving methods?
Simplex LP works best on simple, linear problems where the answer is a straight line. GRG Nonlinear handles more complex problems with curves and multiple variables. Evolutionary is slowest but can solve very complicated problems that the other two cannot. Start with the default and switch only if Solver cannot find an answer.
Can Solver change text or just numbers?
Solver only changes numbers. It cannot pick between text options like "red" or "blue." If you need to choose between options, you have to set up your spreadsheet with numbers (like 1 for red, 2 for blue) and then interpret the answer yourself.
How long does Solver usually take to find an answer?
Simple problems usually solve in seconds. Complex problems with many variables and constraints can take a minute or more. If Solver seems stuck, you can click the Stop button in the Solver window to cancel it and try a different solving method.
Can I save my Solver setup so I do not have to enter it again?
Yes. In the Solver window, click the Save button before you click Solve. Solver will save your target cell, variable cells, and constraints. The next time you open Solver, you can load that setup by clicking Load and selecting the saved file.