Goal Seek in Excel: Work Backwards to Find the Number You Need
Goal Seek in Excel: Work Backwards to Find the Number You Need
Goal Seek works backwards from a result you want. You tell Excel which formula cell should reach a target value, and which input cell it's allowed to change, and Excel adjusts that input until the formula hits the target. You'll find it under Data > What-If Analysis > Goal Seek.
A manager once asked me, quite casually, how many units we'd need to sell to hit a profit target for the quarter. I had a perfectly good profit model already. So I did what I'd always done: typed a guess into the units cell, looked at the profit, typed a higher guess, then a lower one, and carried on like that for about a quarter of an hour, narrowing in on the answer. A colleague leaned over, said "Goal Seek," and had the answer in about ten seconds. I've never forgotten how silly I felt, and I've also never guessed and checked since.
How do I use Goal Seek?
Goal Seek has three boxes, and the key is understanding what each one wants.
- Set up a model where one formula cell depends on one input cell
- Go to Data > What-If Analysis > Goal Seek
- Set cell: the cell containing the formula whose result you care about
- To value: the target number you want that formula to reach
- By changing cell: the input cell Excel is allowed to adjust
- Click OK, and Excel shows whether it found a solution, and changes the input cell to match
The "Set cell" must contain a formula. The "By changing cell" must contain a plain number, not a formula, because Excel needs to be able to overwrite it.
What does a real Goal Seek example look like?
Here's a simple profit model, the kind I used for that manager's question.
| Cell | Item | Value |
|---|---|---|
| B1 | Selling price per unit | $45 |
| B2 | Cost per unit | $28 |
| B3 | Fixed costs for the quarter | $12,000 |
| B4 | Units sold | 1,000 (a starting guess) |
| B5 | Profit | =(B1-B2)*B4-B3 |
With 1,000 units, profit comes out at $5,000. The question is: how many units are needed for a profit of $20,000?
- Go to Data > What-If Analysis > Goal Seek
- Set cell: B5
- To value: 20000
- By changing cell: B4
- Click OK
Excel changes B4 to roughly 1,882.35 units, which is the point where profit hits $20,000. Since you can't sell a fraction of a unit, round up to 1,883 in practice. You can check the maths yourself: $17 profit per unit, times 1,882.35, minus $12,000 fixed costs, is $20,000.
Why does Goal Seek say it can't find a solution?
A few common reasons:
- The input cell contains a formula instead of a number. Goal Seek has to overwrite it, so it must be a plain value.
- The formula doesn't actually depend on the input cell. If there's no link, changing the input can't move the result.
- There's no possible answer. Perhaps the target is unreachable given the model, for example a profit target that's higher than the model can ever produce.
- The starting value is far from the answer. Goal Seek uses an iterative method, and a wildly different starting point can send it off course. Try typing a more sensible starting guess into the input cell and run it again.
Why is the Goal Seek answer slightly off?
Goal Seek stops when it gets close enough, not when it's exactly right. By default, Excel's iterative calculation settings allow a small margin of error, so you might see a result like 19,999.98 rather than exactly 20,000. For most business questions that's fine. If you need more precision, check the iteration settings under File > Options > Formulas, though the exact options can vary slightly by version.
What are the limits of Goal Seek?
This is where it helps to be realistic about the tool.
- One input at a time. Goal Seek changes a single cell. If you've got several levers (price, volume and cost all changing at once), you'd need Solver, a separate add-in, which is beyond what I'll cover here.
- The answer is static. Goal Seek writes a number into the input cell. If your data changes later, you'll need to run it again.
- It finds one answer. If a problem has several valid solutions, Goal Seek finds one of them, usually whichever is nearest to your starting value.
Can I use Goal Seek with lookups or other formulas?
Yes, as long as the Set cell ultimately depends on your input cell, the chain of formulas in between doesn't matter. If your model uses SUMIFS to pull totals from a data table, Goal Seek can still adjust an input upstream of it, which pairs nicely with the filtering logic in my post on "SUMIF, COUNTIF and SUMIFS".
One practical tip: keep your input cells clearly labelled and in one place, ideally with a fixed address. If you've read my post on "absolute vs relative references", that's the same habit that stops formulas from drifting when you copy them around. A model with its assumptions in tidy fixed cells is far easier to run Goal Seek on, and far easier for someone else to understand.
FAQ
Where is Goal Seek in Excel? Go to the Data tab, then What-If Analysis in the Forecast group, then Goal Seek. The layout can vary slightly depending on your Excel version.
Can I undo Goal Seek? Yes, Ctrl+Z reverses it, because it simply changed the input cell. You can also just type your original number back in.
What's the difference between Goal Seek and Solver? Goal Seek changes one input to reach one target. Solver can change several inputs at once and handle constraints, like "keep total cost under $50,000." Solver is an add-in that you may need to switch on under File > Options > Add-ins.
Can I use Goal Seek on a date or a percentage? Yes, it works with any numeric value, including dates (which are stored as numbers) and percentages. Just make sure the target value is entered in the same form as the cell, so use 0.25 or 25% as appropriate.
Does Goal Seek work across different sheets? The Set cell and the changing cell both need to be on the active sheet when you open the dialog. If your model spans sheets, set up the key formula and input on one sheet, or link them to cells on that sheet first.


Comments
Post a Comment