Sub topic 6
When Goal Seek fails or misleads
This chapter assumes you can run Goal Seek (set cell, to value, by changing cell) and that you know the break-even, loan-term and required-growth examples. It also assumes you know that Goal Seek searches by iteration and stops within a tolerance. Here you learn the ways it breaks, how to tell a good answer from a bad one, and how to check a result before it reaches a report.
Why failures matter more than successes
Goal Seek is easy to run and gives little feedback. When it fails loudly, you see a dialog. When it fails quietly, it leaves a number in your input cell that looks reasonable and is wrong. Quiet failures are the dangerous ones. They fall into three groups:
- The search cannot start, so Excel refuses the request.
- The search runs but cannot reach the target.
- The search stops and reports a result that is not the answer you wanted.
Failures that stop the search at the start
These are the easy cases because Excel tells you.
- The changing cell contains a formula. Goal Seek must overwrite the cell, so it needs a typed value. Excel shows "Cell must contain a value". Replace the formula with a number, or pick a different input.
- The set cell contains a constant. The set cell must hold a formula that depends on the changing cell. Excel shows "Cell must contain a formula".
- The input is text or an error. If the formula chain returns
#N/Aor#DIV/0!at the starting value, the search has nothing to compare.
A less obvious version is a set cell that does not depend on the changing cell at all. This happens when a link is broken, a value is pasted over a formula, or the model uses a hardcoded copy of the input. Goal Seek then runs, changes the input, sees no change in the output, and ends with a status message that it may not have found a solution. Test the dependency before you search by changing the input by hand and watching the output move.
Failures where no answer exists
Goal Seek does not know whether a solution exists. It searches and stops.
Suppose you ask for a net margin of 40% by changing the sales price, but the margin rises toward a ceiling of 35% as price rises. No price reaches 40%. Goal Seek ends with the message "Goal Seeking with Cell B9 may not have found a solution", and the input cell holds the last value it tried. Excel does not restore the original value.
> Always read the Goal Seek Status dialog before you click OK. Clicking OK keeps whatever value the search ended on, even when the search failed.
Failures where several answers exist
Many models have more than one input value that reaches the target. Goal Seek returns the one nearest to where it started.
Take a pricing model where demand falls as price rises:
- Units sold = 2000 − 20 × price
- Operating profit = units × (price − 30) − 15,000
Profit is negative at low prices (thin margin) and at high prices (almost no demand). It is positive in between. So profit equals zero at two prices. Starting Goal Seek near 50 finds a price near 43.21. Starting near 80 finds a price near 86.79. Both are correct answers to "profit equals zero", and they mean opposite things. One is the lowest viable price and the other is the highest.
The Python snippet below shows both roots by bracketing each side of the profit peak at a price of 65.
from scipy.optimize import brentq
def profit(price):
units = 2000 - 20 * price
return units * (price - 30) - 15000
low_root = brentq(profit, 30, 65)
high_root = brentq(profit, 65, 100)
print(round(low_root, 2), round(high_root, 2))It prints 43.21 86.79. In Excel, the fix is to try several starting values and to decide, from the business meaning, which root you want.
A related trap is a start at or near a turning point. At a price of 65, the profit curve is flat, so a small change in price produces almost no change in profit. The search has no direction to follow and may stall or jump far away. Start away from the peak.
Failures caused by the shape of the formula
Goal Seek works best when the output changes smoothly and in one direction as the input changes. Formulas that break this give poor results:
| Formula feature | What goes wrong |
|---|---|
| `IF` thresholds, tax brackets, tiered pricing | The output jumps. The target may sit inside a jump, so no input produces it exactly. |
| `ROUND`, `MROUND`, `INT` | The output moves in steps with flat stretches. The search sees no slope on a flat stretch. |
| `MAX(0, …)` and `MIN` | Output is flat in the clipped region, so the search stalls there. |
| `VLOOKUP` or `INDEX/MATCH` with approximate match | Output only changes when the input crosses a table row. |
| Non-monotonic curves | Several roots, as in the pricing example. |
| Circular references | The output depends on iterative calculation, so each trial value is itself approximate. |
For a step function, the exact target may be impossible. If a cost jumps from 10,000 to 12,000 at 500 units, no volume gives a cost of 11,000. Goal Seek stops near the jump and reports failure, which is correct.
Failures caused by tolerance
Goal Seek uses the iteration settings under File > Options > Formulas. The default Maximum Change is 0.001, and the default Maximum Iterations is 100. The search stops when the set cell is within Maximum Change of the target, or when it runs out of iterations.
Maximum Change applies to the set cell in its own units. That causes two opposite problems.
- Small-scale targets. If the set cell is a growth rate such as 0.05, a tolerance of 0.001 is a tenth of a percentage point. The search can stop at 5.1% when you asked for 5.0%. Fix this by scaling the set cell. Point Goal Seek at a helper cell that holds the rate in basis points (
=B10*10000), or lower Maximum Change to 0.000001. - Large-scale targets. If the set cell is in dollars and values are in the millions, 0.001 is very tight. The search may need many iterations and may stop on the iteration limit instead.
Check the residual after every run. The residual is the set cell minus the target.
A12: Target value B12: 0
A13: Residual B13: =B5-B12
A14: Within tolerance? B14: =IF(ABS(B13)<0.01,"OK","CHECK")Failures that come from what Goal Seek does not do
- One input only. It changes a single cell. If two inputs interact (price and volume), you must fix one and solve for the other, and the answer depends on the value you fixed.
- No constraints. Nothing stops it from returning negative units, a price below cost, or a growth rate of 400%. You must check the answer against business limits.
- It overwrites your input. The original value is gone unless you saved it. Excel's Undo (Ctrl+Z) works right after a run, but not after other edits.
- No audit trail. The result is a typed number. Anyone who opens the file sees a value in the input cell and cannot tell it came from a search. When the model changes, the stale number stays. Record the target, the date, and the cells used in a note beside the input.
A diagnostic path
The flowchart is a checklist to run after any Goal Seek, in this order.
Checking from code
Range.GoalSeek returns True or False, but a True still deserves a residual check. This macro keeps the original value and puts it back when the search fails.
Sub SolveBreakEvenChecked()
Dim original As Double
Dim ok As Boolean
original = Range("B1").Value
ok = Range("B5").GoalSeek(Goal:=0, ChangingCell:=Range("B1"))
If Not ok Or Abs(Range("B5").Value) > 0.01 Then
Range("B1").Value = original
MsgBox "Goal Seek failed. The original input was restored."
ElseIf Range("B1").Value < 0 Then
Range("B1").Value = original
MsgBox "Result is negative and was rejected."
End If
End SubThe macro handles three of the failures above: a failed search, a poor residual, and a result outside a business limit. It does not detect multiple roots. For that, call it from several starting values and compare the answers.
Summary of failure modes
- Input is a formula, or the set cell is a constant: Excel refuses.
- No dependency, or no solution: the status says it may not have found a solution, and the input keeps the last trial value.
- Several roots: the answer depends on the start value.
- Steps and flat regions: the exact target may not exist.
- Tolerance: the default Maximum Change of 0.001 is too loose for small-scale cells.
- Missing features: one input, no constraints, input overwritten, no audit trail.
Exercise
A model computes a revenue growth rate in cell C4 (for example 0.08 for 8%). You run Goal Seek with Set cell C4, To value 0.05, and the status says a solution was found. The input cell shows a growth driver that gives C4 = 0.0507. What went wrong, and give two ways to fix it?
Show answer
The default Maximum Change of 0.001 is large compared with a rate near 0.05, so the search stopped as soon as the result was within 0.001 of the target (0.0507 is within 0.001 of 0.05 only in the loose sense that the search treats it as converged). Fix it by lowering Maximum Change (for example to 0.000001) under File > Options > Formulas, or by pointing Goal Seek at a helper cell that holds the rate in basis points (=C4*10000) with a target of 500. Also add a residual check cell so the gap is visible.
Exercise
In the pricing model (units = 2000 − 20 × price, profit = units × (price − 30) − 15,000), you run Goal Seek for profit = 0 starting from a price of 50 and get 43.21. A colleague starts from 80 and gets 86.79. Who is right, and what should you do?
Show answer
Both are right. Profit is a curve that crosses zero twice, once on each side of the profit peak at a price of 65. 43.21 is the lowest price that breaks even and 86.79 is the highest. Decide from the business context which side you mean, then document the start value used. A residual check passes for both, so only a second start value reveals the issue.