Excel’s Goal Seek can change only one input cell at a time. To make a formula reach a target by changing two or more inputs together, use Solver instead: enable the Solver Add-in, set the formula cell as the objective, choose a target value, and list the changing cells.
Why Goal Seek cannot change multiple inputs
Goal Seek is a focused what-if tool for answering a particular question: what value must go in one input cell for a formula to return a specified result? In Excel for Microsoft 365 on Windows, select the formula cell, then choose Data > What-If Analysis > Goal Seek. Enter the target in Set cell, the desired result in To value, and the one editable input in By changing cell.
For example, if a revenue formula multiplies a unit price by units sold, Goal Seek can find the price needed to reach a revenue target while units sold stay fixed. It cannot adjust both price and units sold in the same run. Goal Seek has no field for a range of changing cells, and running it again for another input is not equivalent to solving for both at once: the second run can change the result of the first.
This distinction matters whenever a model has several possible ways to reach its target. If price and sales volume are both free to move, many combinations may produce the same revenue. Excel needs more instructions, such as limits or a preference for minimizing costs, to choose a useful answer. Solver provides those controls.
Use Solver for two or more changing cells
Solver is an Excel add-in that can find values for multiple cells to either reach a target or optimize a result. In Windows desktop Excel, enable it by choosing File > Options > Add-ins. At the bottom, set Manage to Excel Add-ins and select Go, then check Solver Add-in and choose OK. Once enabled, Solver appears on the Data tab, usually in the Analyze group.
To configure a target-value problem, open Data > Solver and fill in the fields:
- Set Objective: select the cell containing the formula you want to control.
- To: choose Value Of and enter the target, or choose Max or Min if the aim is to optimize rather than hit a specific number.
- By Changing Variable Cells: select all the input cells Solver may adjust. Separate nonadjacent cells with commas, or select a range.
- Subject to the Constraints: add limits such as nonnegative quantities, maximum capacity, or whole-number requirements when they apply.
- Solving Method: choose a method that fits the model, then select Solve.
Review Solver’s result message before accepting it. You can keep the solution or restore the original values. Solver may also offer reports for some problems; these can help explain the solution, but do not replace checking that the model and constraints represent the real question.
A worked example with price and sales volume
Suppose a small business model has a selling price in A2, units sold in B2, fixed costs in C2, unit cost in D2, and calculated profit in E2. Start with a price of 25, 300 units, fixed costs of 2,000, and unit cost of 10. In E2, with those cell assignments, enter =(A2-D2)*B2-C2. The starting result is (25 − 10) × 300 − 2,000, or 2,500.
Imagine the target is 5,000 in profit and both price and units sold may change. In Solver, set the objective to E2, choose Value Of 5000, and set the changing cells to A2:B2. The model has more than one possible answer. For instance, a price of 24 and sales volume of 500 gives (24 − 10) × 500 − 2,000 = 5,000. This is a valid combination, but it is not automatically the best business decision: it may be unrealistic to assume that a lower price produces a particular volume.
Use constraints to keep the answer meaningful. You might require a price to stay within an approved range, sales to remain below production capacity, or units sold to be an integer. If the model does not include a relationship between price and demand, Solver cannot infer one. It only works with the formulas and limits in the worksheet.
Choose a solving method that fits the model
Solver’s method affects how it searches; it does not repair incorrect assumptions or missing formulas. For a linear model, where changing a variable has a consistent proportional effect and the constraints are linear, choose Simplex LP. A model with smooth nonlinear relationships often suits GRG Nonlinear. Evolutionary can be useful when formulas are discontinuous or otherwise difficult for the other methods, though it may take longer and may not find the best possible result.
For example, a cost-minimization model with linear material costs and capacity limits may be a linear problem. A model involving a variable multiplied by another variable, or a nonlinear formula such as a power relationship, may not be linear. If you are unsure, inspect the formulas and constraints rather than choosing a method solely because it returned a result. The method should match the mathematics of the model.
When a model has integer or binary decisions, add the relevant constraint in Solver, such as requiring a cell to be integer or binary. These restrictions can make the search harder. Check that the selected method supports the structure of the model, and read the Solver result message to see whether it found a solution, stopped early, or could not satisfy the constraints.
When a Data Table is a better fit
A two-variable Data Table is useful when you want to see how a formula changes across a grid of possible values for two inputs. It calculates results for combinations you supply, such as several interest rates and loan terms, without trying to select the combination that reaches a target. Find it in desktop Excel through Data > What-If Analysis > Data Table.
Use Solver when Excel needs to search for input values that meet a target or optimize an objective. Use a Data Table when you want to compare a planned set of input combinations and inspect their outcomes. A Data Table does not replace Solver just because it displays two inputs; it evaluates the values you provide rather than deciding which values solve the problem.
Goal Seek, Solver, and Scenario Manager compared
These tools address related but different questions. Goal Seek changes one input to reach a target in one formula. Solver can change multiple inputs, optimize an objective, and apply constraints. Scenario Manager stores sets of input values so you can switch among and compare named cases; it does not search for the inputs that achieve a target.
As a rule of thumb, use Goal Seek for a simple one-input question, Solver for a multi-input target or optimization problem, a Data Table for a grid of sensitivity results, and Scenario Manager for comparing a handful of defined cases. A worksheet can also combine them: scenarios might represent different planning assumptions, while Solver finds a feasible plan within each scenario.
Common problems and ways to fix them
- Solver is missing: confirm that the Solver Add-in is enabled in Excel Add-ins. If you are using Excel for the web, open the workbook in desktop Excel for the standard Solver workflow described here.
- The formula cell does not change: the objective must be a formula that depends, directly or indirectly, on the changing cells. Check cell references and ensure the input cells are not locked by sheet protection.
- Solver reports no feasible solution: the target may conflict with the constraints, or the model may not permit the result. Temporarily review the limits and the formula logic, then restore the constraints that are genuinely required.
- The answer looks implausible: add realistic bounds, integer requirements, or other necessary rules. Solver cannot know that a price, quantity, or operating level is unreasonable unless the worksheet expresses that restriction.
- Different runs return different combinations: multiple solutions may satisfy the same target. Add an objective that reflects what you actually want to minimize or maximize, or add constraints that distinguish acceptable answers.
Keep a copy of the original inputs before solving, especially when trying different constraints or methods. Solver changes worksheet values as it searches, and preserving a starting version makes it easier to compare the result with the original model.
Using Solver on a Mac
The article’s main instructions use Microsoft 365 desktop Excel for Windows. In Excel for Mac, Solver is also an add-in, but its activation route differs: choose Tools > Excel Add-ins, select Solver Add-in, and confirm. Then look for Solver on the Data tab. Names or placement can vary slightly by Excel release, so use the app’s available add-in controls if the menu layout differs.
Excel for the web does not provide the same full desktop Solver workflow. If Solver is unavailable in the browser, use Open in Desktop App and run the add-in there. Saving the workbook back to OneDrive or SharePoint allows you to continue working with the updated file online, although the solve operation itself should be performed in desktop Excel.
Frequently Asked Questions
Can Excel Goal Seek change two cells at once?
No. Goal Seek accepts one changing cell per run. Use Solver when two or more inputs need to vary together.
How do I make Goal Seek work with multiple variables?
Open Data > Solver after enabling the Solver Add-in. Set the formula cell as the objective, choose a target value, and enter all adjustable input cells in By Changing Variable Cells.
Is Solver included with Excel?
Solver is available as an Excel desktop add-in, but it may need to be enabled first. The standard add-in workflow is not the same as running Solver in Excel for the web.
Why does Solver give me an unexpected answer?
It may have found a mathematically valid result that violates an assumption you did not encode. Check the formulas, add realistic constraints, and consider whether the model has several valid solutions.
Can I use a Data Table instead of Solver?
Use a Data Table to calculate results for input combinations you choose. Use Solver when Excel must search for values that hit a target or optimize an outcome.
Related
- Excel Data Table With 3 Variables: Limits and Workarounds
- Excel Data Table With Multiple Outputs: How It Works
- Excel Data Table Sensitivity Analysis Explained
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Add Continuous Page Numbers in Microsoft WordTo add continuous page numbers in Word, choose Insert > Page Number, select a position and style, then…
- Excel Find and Replace Everything After a CharacterTo remove everything after a character in Excel, press Ctrl+H, enter that character followed by an asterisk in…
- Google Sheets European Date Format: Set It CorrectlyTo use a European-style date in Google Sheets, set the spreadsheet’s region under File > Settings > General…
- Google Sheets: Highlight Duplicates in a ColumnTo highlight duplicate values in a Google Sheets column, select the cells, choose Format > Conditional formatting, and…
- Google Sheets GOOGLEFINANCE Formulas: Examples and TipsIn Google Sheets, use =GOOGLEFINANCE("NASDAQ:GOOG","price") to fetch the latest available price for Alphabet’s stock, or replace the ticker…
- Excel Date Calendar: Create, Format, and Use One EasilyAn Excel date calendar is a worksheet that displays dates in a familiar day-by-day or month-by-month layout. In…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.