In Excel for Microsoft 365 on Windows, press Alt+A, W, G in sequence to open Goal Seek; do not hold all three keys at once. You can also open it from Data > What-If Analysis > Goal Seek. Goal Seek works backward from a result you want to find the input value that produces it.
What the Goal Seek shortcut does
The shortcut uses Excel’s ribbon KeyTips: Alt+A selects the Data tab, W opens the What-If Analysis menu, and G selects Goal Seek. Depending on your Excel build, ribbon layout, or language, the letters displayed on screen may differ. If the sequence does not open the dialog, press Alt to show the current KeyTips and follow the letters Excel displays rather than repeatedly trying an assumed shortcut.
Goal Seek is not a single dedicated key such as F4. It is a sequence of keyboard commands that follows the ribbon’s menu structure. You can use the mouse instead: select the Data tab, choose What-If Analysis in the Forecast group, then choose Goal Seek. The tool is included in the desktop versions of Excel, including Microsoft 365 for Windows.
What Goal Seek is for
Goal Seek is a form of one-variable, backward calculation. Normally, you enter an input and Excel calculates an output. With Goal Seek, you specify the output you want, identify the formula cell that calculates it, and ask Excel to find one input that makes the formula return the target.
For example, a worksheet might calculate profit from units sold, price per unit, and fixed costs. If you know the profit target and the other assumptions, Goal Seek can calculate the number of units required. It changes one cell at a time; it does not discover a target for several independent inputs simultaneously.
The feature is useful when a formula is already in place but algebraic rearrangement would be inconvenient. It does not create a new formula or explain the relationship for you. It changes an input cell in the workbook until the result cell is sufficiently close to the requested value.
How to set up a Goal Seek calculation
Before opening the dialog, make sure the worksheet has a formula cell that depends, directly or indirectly, on the input you want Excel to change. A practical example is a basic profit model. Suppose B2 contains units sold, B3 contains price per unit, and B5 contains fixed costs. With those cell meanings, enter the profit formula in B4:
=B2*B3-B5
For an illustrative starting point, enter 120 in B2, 25 in B3, and 2500 in B5. The formula returns 500, because 120 multiplied by 25 is 3000, and 3000 minus 2500 is 500. If the desired profit is 1000, Goal Seek can change the units in B2 while leaving the price and costs alone.
- Select the formula cell B4, or open Goal Seek and enter B4 in the Set cell box.
- In the To value box, type 1000. Enter a number, not a formula or a cell reference.
- In the By changing cell box, enter B2, the input that Excel is allowed to adjust.
- Choose OK and review the result. Excel reports whether it found a solution and shows the changed value in the worksheet.
- Choose OK in the result message to keep the result, or Cancel to restore the previous worksheet values.
In this example, the answer is 140 units: 140 times 25 is 3500, and 3500 minus 2500 is 1000. Goal Seek may show a decimal value for problems that do not have a whole-number answer. If the input represents something that must be a whole item, apply suitable rounding or constraints separately and check the resulting formula value.
Understanding the three dialog boxes
Set cell is the formula cell whose result you want to control. It must contain a formula, and that formula must be affected by the changing cell. In the example, B4 is the profit formula. Selecting a cell that contains only a typed number will not give Goal Seek a calculation to work backward through.
To value is the target result, entered as a numeric value. To ask for a profit of 1000, type 1000. Do not type a currency symbol unless the cell’s number format displays it; formatting affects how a value looks, not the underlying number Goal Seek uses.
By changing cell identifies the single input Excel may adjust. It should be a value cell rather than another formula cell. The target formula must depend on this input. If changing B2 has no effect on B4, Goal Seek has no route to reach the target by changing B2.
Windows, Mac, and Excel for the web
On Windows, the keyboard sequence is usually Alt+A, W, G in desktop Excel with the standard English ribbon. Press each part in order. The menu route, Data > What-If Analysis > Goal Seek, is a dependable alternative and also helps you locate the feature if KeyTips have changed.
On a Mac, use the Excel menu path Data > What-If Analysis > Goal Seek if it is available in your installed desktop version. The Windows Alt+A, W, G sequence is not a universal Mac shortcut; Mac keyboard behavior and ribbon KeyTips differ. Use the menu, or inspect the KeyTips available in your own Mac build rather than assuming the Windows letters apply.
Excel for the web does not provide the same full desktop What-If Analysis tools, including the standard Goal Seek dialog. If you need Goal Seek, open the workbook in the Excel desktop application. Menu wording or availability can vary by platform and update, so check the Data tab in the version you are using.
Limits and alternatives
Goal Seek is designed for one changing cell and one target formula result. If a model needs several assumptions adjusted together, or if you need to impose limits such as a minimum, maximum, or whole-number requirement during the search, use Solver instead. Solver is an Excel add-in and may need to be enabled; it supports more complex optimization setups than Goal Seek.
For a straightforward formula that can be rearranged easily, calculating the input directly may be clearer than running Goal Seek. For instance, in the profit example, the relationship can be rearranged to solve for units. Goal Seek is especially convenient when the formula is complicated, contains several linked calculations, or would be tedious to rearrange by hand.
Goal Seek also is not the same as a data table. A data table compares results across a range of one or two input values, while Goal Seek searches for an input that reaches one specified output. Choose the tool based on whether you want a target input or a set of scenario results.
Common problems and how to fix them
- The result cell is not a formula. Put a formula in Set cell, and make sure it depends on the input cell you selected.
- The wrong input changes. Check the By changing cell reference. Goal Seek alters that cell’s value, so confirm it is the assumption you intend to vary.
- Excel cannot reach the target. The target may be impossible for the current formula and other inputs, or the formula may not respond usefully to the chosen input. Check the model and test a sensible starting value.
- The answer is close but not exact. Goal Seek uses an iterative numerical search, so its result can be approximate. Check the displayed formula result and the precision required for your task.
- The displayed number seems different from the stored result. Cell formatting can round what you see. Increase displayed decimal places or inspect the formula bar before concluding that the target was missed.
For difficult calculations, try a plausible starting value in the changing cell and verify that increasing or decreasing it moves the result in the expected direction. A discontinuous formula, a formula with thresholds, or a result that changes very little near the target can make a search less straightforward. Goal Seek does not guarantee that every mathematical problem has a useful or unique answer.
Frequently Asked Questions
What is the keyboard shortcut for Goal Seek in Excel?
In desktop Excel for Microsoft 365 on Windows, press Alt+A, then W, then G. It is a sequence of ribbon KeyTips, not a three-key combination held together. If the letters differ, follow the KeyTips shown by your Excel version.
Where is Goal Seek in Excel?
On the desktop ribbon, go to Data > What-If Analysis > Goal Seek. The command opens a dialog with fields for the formula cell, target value, and changing cell.
Can Goal Seek change more than one cell?
No. Goal Seek changes one input cell to make one formula cell reach a target. Use Solver when you need multiple changing cells or additional constraints.
Why is Goal Seek greyed out or not working?
Check that you are using desktop Excel and that the selected Set cell contains a formula. The formula must depend on the changing cell. Excel for the web does not offer the standard desktop Goal Seek dialog.
Does Goal Seek change my formula?
No. It changes the value in the By changing cell and recalculates the formula in Set cell. Review the result before accepting it, especially if the input is an important workbook assumption.
Is there a Goal Seek shortcut on Mac?
The Windows Alt+A, W, G sequence should not be assumed to work on Mac. Open Goal Seek from Data > What-If Analysis > Goal Seek in desktop Excel for Mac, when available in that version.
Related
- Excel Adjust Page Breaks for a Better Print Layout
- Excel and Outlook Not Responding? Causes and Fixes
- Excel Page Breaks for Printing: How to Add Them Easily
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Nested IFs in Google Sheets: Formulas and AlternativesTo create nested IFs in Google Sheets, put another IF inside the first one’s result: for example, with…
- Excel Not Letting You Copy and Paste? Fixes That WorkIf Excel will not copy and paste, first press Esc, select one ordinary cell, copy it with Ctrl+C,…
- Employee Work Schedule Template for Google SheetsTo make an employee work schedule template in Google Sheets, create a spreadsheet with columns for date, employee,…
- COUNTIF in Google Sheets: Syntax and ExamplesIn Google Sheets, COUNTIF counts cells in a range that meet one condition. With product names in A2:A20,…
- Camping Meal Planner Spreadsheet: Plan Meals and Pack FoodA camping meal planner spreadsheet helps you map meals to each day, estimate how much food to bring,…
- How to Set an Out of Office Reply in Outlook 365To set an out of office reply in Outlook 365, open Automatic Replies, switch them on, write your…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.