Excel Goal Seek Cell Must Contain Value: Causes and Fixes

How-to basics · Updated November 3, 2026

Excel Goal Seek Cell Must Contain Value: Causes and Fixes

Excel Goal Seek needs a formula in the Set cell and an existing value in the By changing cell. If you see a cell-must-contain-a-value error, make sure the changing cell is a numeric input—not blank, text, or a formula—and that the Set cell’s formula depends on it.

What the Goal Seek error means

Goal Seek works backward from a desired result. You tell Excel which formula result to reach, enter the target value, and identify one input cell Excel may adjust. The message points to a cell that does not meet the requirements for that setup, most often the cell selected in By changing cell. The exact wording can vary between Excel versions, so check all three fields rather than relying on the message alone.

The key distinction is between the result and the input. The Set cell should calculate a result with a formula. The By changing cell should contain a starting value that Excel can replace. If the input is empty or contains a label such as “two,” Goal Seek may have no usable number to adjust. If the Set cell is a typed number rather than a formula, Excel has no calculation to work backward through.

How Goal Seek uses the three fields

In Excel for Microsoft 365 on Windows, open Data > What-If Analysis > Goal Seek. The dialog has three fields, each with a distinct purpose:

  • Set cell: The cell whose formula result you want to reach. It must contain a formula, such as a calculation based on other cells.
  • To value: The target result. Enter a number, not a cell reference or a formula.
  • By changing cell: The one input cell Excel is allowed to vary. It must contain a value and be used, directly or indirectly, by the Set cell formula.

For example, setting a blank cell as the Set cell will not work just because you typed a target into To value. Likewise, choosing a valid formula cell and target is not enough if the changing cell is unrelated to that formula. Goal Seek changes only one cell at a time; it does not select a range of inputs for you.

Fix the changing cell step by step

Start by closing the error message and checking the cell address shown in By changing cell. Select the cell on the worksheet if you are unsure which one the address refers to. Then inspect its contents in the formula bar. A blank, text entry, or formula is a reason to review the setup: Goal Seek needs an input value it can adjust, rather than another calculated result.

  1. Enter a reasonable starting number in the intended input cell. The initial value is a starting guess, not necessarily the answer.
  2. Check that the Set cell contains a formula, not a typed result or text.
  3. Confirm the Set cell formula uses the changing cell, either directly or through other formulas.
  4. In Goal Seek, select the formula cell for Set cell, type the numeric target in To value, and select the input cell for By changing cell.
  5. Choose OK, review the proposed result, and choose OK again to keep it or Cancel to restore the original worksheet values.

If the input cell currently holds a formula, decide which cell should actually be the adjustable assumption. Put the starting value there and revise the calculation so the formula cell refers to that input. Do not overwrite an important formula without first understanding what it calculates.

A simple example to check the setup

Suppose a worksheet calculates distance from speed and time. With speed in B1, starting time in B2, and the calculated distance in B3, enter the formula below in B3:

=B1*B2

For instance, put 60 in B1 and 1 in B2. B3 then calculates 60. To find the time needed for a distance of 150, use B3 as Set cell, enter 150 as To value, and use B2 as By changing cell. Goal Seek should find 2.5, because 60 × 2.5 = 150. B2 must contain a starting number, and B3 must contain the formula; reversing those roles produces an invalid setup.

This example also shows why a formula can be valid but still produce the error: the formula cell and input cell have different jobs. If B3 contains the typed number 60 instead of the formula, Excel cannot calculate how changing B2 affects B3. If B2 is blank, enter a starting value before trying again.

Other setup problems that look similar

Several problems can prevent Goal Seek from working even after the changing cell has a number. Check the whole chain from input to result:

  • The formula does not refer to the input. If the result formula never uses the changing cell, adjusting that cell cannot change the result. Add the intended reference to the calculation or choose the correct input.
  • The target is entered as text. A number stored as text, or a target with extra characters, may not behave as intended. Enter a plain numeric target in To value.
  • The result formula returns an error or text. Resolve errors such as #VALUE! first. Goal Seek needs a meaningful numeric result to compare with the target.
  • The input is constrained by worksheet setup. A protected sheet, a merged-cell selection, or a mistaken cell address can obstruct editing. Check that the intended input cell is editable and selected correctly.
  • Calculation is set to Manual. If results appear stale, check Formulas > Calculation Options > Automatic, then recalculate and retry.

Also check for accidental spaces or labels in the input, and confirm that formulas use the cell you expect. A formula may refer to a different row or sheet than the one visible beside it. Clicking the formula cell and tracing its references is often faster than repeatedly changing Goal Seek settings.

What Goal Seek can and cannot solve

Goal Seek is a single-variable, iterative tool. It tries different values in one input cell until the formula result is close enough to the target under Excel’s calculation settings. It is useful for questions such as “What time produces this distance?” or “What quantity makes this total reach a chosen value?” The input does not have to affect the result in a straight line, but a complicated or discontinuous formula can make a solution difficult to find.

Goal Seek is not a general-purpose optimizer. It does not adjust several assumptions at once, enforce a list of business rules, or promise that a solution exists. A formula may have no value that produces the requested target, or it may have more than one possible answer. The starting value can influence which answer an iterative process approaches. After Excel reports a solution, check that the resulting input is sensible and that recalculating the worksheet preserves the expected result.

If the input must be an integer, positive, or within a particular range, inspect the result and apply those rules yourself. Goal Seek does not provide a full set of bounds and constraints in its dialog. Avoid treating a result that is numerically close as automatically correct when the worksheet’s real-world rules require an exact or restricted value.

Goal Seek compared with Solver and alternatives

Use Goal Seek when there is one output formula, one desired result, and one input to vary. For a problem involving multiple changing cells or explicit constraints, Excel’s Solver add-in is a better fit. Solver is an add-in and may need to be enabled; it is found under Data when available. Its setup is more involved because you specify an objective, variable cells, and any constraints.

For a straightforward calculation, direct algebra may be quicker and easier to audit. A one-variable data table can show how an output changes across many candidate inputs, while Goal Seek finds an input for one target. If you are working in Excel for the web and cannot find Goal Seek, open the workbook in the desktop Excel app; availability of what-if tools differs by environment and build. On Mac, look for Goal Seek on the Data tab under What-If Analysis in desktop Excel; labels and dialog layout can vary slightly by release.

Frequently Asked Questions

Does the Goal Seek changing cell have to contain a number?
It needs a starting value that Excel can change, normally a numeric value for a numeric calculation. Enter a sensible starting number rather than leaving the cell blank or typing a text label.

Can the Set cell be a value instead of a formula?
No. The Set cell must contain a formula whose result Excel can recalculate. A typed number does not tell Excel how the result responds when an input changes.

Can Goal Seek change more than one cell?
No. Goal Seek adjusts one By changing cell. Use Solver when the model requires multiple changing cells or constraints, or reconsider whether the problem can be expressed with one input.

Why does Goal Seek say it cannot find a solution?
The target may be unreachable, the formula may not depend on the selected input, or the calculation may be difficult for the iterative search to solve from its starting value. Check the formula and try a more suitable initial input, then verify any result rather than assuming a solution exists.

Is Goal Seek available in Excel for the web?
What-if analysis features vary by Excel environment. If Goal Seek is not present in the web interface, open the workbook in desktop Excel for Windows or Mac and check Data > What-If Analysis.

Before accepting the result

When Goal Seek returns a value, check the formula cell and the changed input together. Confirm that the result is close enough to the target for your purpose, that the input is within any practical limits, and that dependent cells still calculate correctly. You can keep the proposed value or undo the Goal Seek result by choosing Cancel in its result dialog. Saving a separate copy before experimenting is prudent when the workbook contains important formulas or many linked sheets.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.