In Excel, “Data table input cell reference is not valid” usually means the Row input cell or Column input cell in the Data Table dialog is not a valid single-cell reference on the same worksheet as the data table. Choose the model’s actual input cell on that sheet, and make sure your scenario values and formula are arranged correctly before creating the table.
What the error means
An Excel data table is a What-If Analysis tool: it substitutes a series of test values into one or two input cells and records the results of a formula. The dialog’s input-cell boxes do not take the range of scenario values. They take the location of the model cell that Excel should temporarily replace while calculating each scenario.
For example, if a formula calculates total sales using a quantity in B2 and a unit price in B3, a one-variable data table can try different quantities by using B2 as its input cell. The values in the table are the test quantities; B2 is the cell Excel changes temporarily. Selecting the scenario range, a formula, or a cell on another worksheet in the input-cell box can cause a reference error.
The wording can vary by Excel version or context. If Excel accepts the reference but the results are wrong or blank, the issue may instead be the table layout, the formula, or calculation settings. Those are separate problems from an invalid reference.
How a data table uses input cells
A one-variable data table tests one model input. Put the formula whose result you want in the table’s upper-left corner. Put test values either down the first column or across the first row, then select the complete block, including the formula cell and the test values. In Data > What-If Analysis > Data Table, enter the model input cell in the matching box:
- If test values run down a column, enter the model cell in Column input cell.
- If test values run across a row, enter the model cell in Row input cell.
For a two-variable data table, values across the top row substitute into the Row input cell, and values down the first column substitute into the Column input cell. The formula in the top-left corner must calculate a result that depends, directly or through other formulas, on both model inputs. The table body shows the results for each combination.
Excel does not permanently replace the model input with every test value. It uses each value in turn to recalculate the formula and then restores the original input. That is why the input-cell box points to a single cell in the model, rather than to the block of test values.
Check the worksheet and reference
Start with the most common cause: the model input cell and the data table are on different worksheets. In Excel’s What-If Analysis Data Table, the input cell must be on the same worksheet as the table. The formula being evaluated can refer to cells on other sheets, but the cell supplied as the table’s input must be on the table’s sheet.
Check these points in the dialog:
- Enter one cell, such as B2, not a range such as B2:B10.
- Use the actual input cell that the output formula depends on, not the formula cell or the cell containing the first test value.
- Confirm that the reference is on the same sheet as the selected data table.
- For a vertical list of test values, use Column input cell; for a horizontal list, use Row input cell.
- For a two-variable table, supply one valid cell in each box, with the horizontal and vertical inputs matched to their respective boxes.
Usually, click the appropriate box and then click the intended cell on the worksheet. Excel fills in the reference, reducing the chance of a typing mistake. If you type it yourself, use a simple same-sheet reference such as B2. A reference to a different sheet, such as Inputs!B2, is not a valid data-table input reference for a table on the current sheet.
Build a small one-variable example
Suppose a worksheet has quantity in B2, unit price in B3, and a sales-total formula in B4. With quantity in B2 and price in B3, enter =B2*B3 in B4. For this example, the formula returns the quantity multiplied by the price; at 10 units and $12 per unit, it returns 120.
To test quantities vertically, put a copy of the result formula in D2, enter 10, 20, 30, and 40 in D3:D6, and select D2:E6. In the Data Table dialog, leave Row input cell blank and set Column input cell to B2. Excel places the calculated results in E3:E6: 120, 240, 360, and 480 when B3 is 12. These results are simple arithmetic examples, not a forecast.
If this setup produces the reference error, confirm that D2:E6 and B2 are on the same worksheet. Also verify that the selected range starts at D2 and includes both the formula and the scenario values. If you accidentally put the formula in D1 or selected only the test values, Excel may not interpret the layout as intended.
Set up a two-variable table correctly
For a two-variable example, keep the same total formula and use quantity and price as the two changing inputs. Put the formula in D2, several price values across E2:G2, and quantity values down D3:D5. Select D2:G5, open Data > What-If Analysis > Data Table, set Row input cell to B3, and set Column input cell to B2. The top-row prices are substituted into B3; the first-column quantities are substituted into B2.
Swapping the two input-cell references is a common source of confusing results. If the horizontal values are prices, Row input cell must point to the model’s price cell. If the vertical values are quantities, Column input cell must point to the quantity cell. Excel may still accept valid references when they are reversed, but the table will test the wrong combinations and may not match expectations.
Use the top-left cell of the selected block for the result formula, not a label. The cells above and to the left of the result grid hold the test values. Keep headings outside the selected table block unless they are intentionally part of the table layout.
When the model is on another worksheet
A frequent misunderstanding is that because the output formula can calculate from a different worksheet, the data-table input cell can also be on that other sheet. The input-cell restriction still applies. One practical arrangement is to place the input cell and the data table together on one worksheet, then have formulas elsewhere in the workbook refer to that input cell.
For example, you might keep the input in Model!B2 and place the data table on a separate Scenario sheet. That layout does not make Model!B2 a valid input-cell reference for the table on Scenario. Instead, put a dedicated driver cell on Scenario and make the model’s calculations depend on it, or move the table to the same sheet as the input. Keep the dependency chain clear so that changing the driver cell genuinely changes the formula result.
A cell linked to another cell with a formula is not always an interchangeable substitute for the model’s true input. Before relying on a helper cell, check that the formulas being evaluated ultimately use that helper as the changing input. If they continue to use a different fixed input, the table can calculate repeated or misleading values.
Other causes and useful checks
If the reference appears to be on the right sheet and still fails, cancel the dialog and inspect the workbook layout rather than repeatedly entering the same reference. Confirm that the target is a single ordinary cell and that the table range is the intended rectangular block. Recreate a small test table in an unused area if necessary; this can help separate a layout problem from an issue in a large, complex model.
- Wrong input box: A vertical scenario list belongs with Column input cell, while a horizontal list belongs with Row input cell.
- Wrong target: The input cell should be a variable used by the calculation, not the displayed result or a scenario-value cell.
- Incomplete selection: Include the formula cell and all test values when selecting the data-table range.
- Protected or restricted sheet: If the worksheet cannot be changed, review its protection and permissions before attempting to create or edit the table.
- Unclear formula dependency: Check that the result formula actually changes when you manually change the proposed input cell.
Data tables are special What-If Analysis structures, not ordinary formula grids. After Excel creates one, its result cells are managed as a data-table array. You generally cannot edit a single result cell as if it were an independent formula; edit or remove the table as a whole, following Excel’s selection rules. Save a copy before making structural changes to a valuable workbook.
Calculation settings and performance
Data tables can take longer to recalculate than a few ordinary formulas because Excel evaluates the model repeatedly—once for each scenario, or once for every combination in a two-variable table. A table with 20 values in one direction and 15 in the other may require 300 scenario calculations. Large models with volatile or complex formulas can therefore feel slow even when the input-cell references are valid.
In Excel for Microsoft 365 on Windows, check Formulas > Calculation Options if the table does not update as expected. Automatic calculation is the usual setting, but Excel also offers calculation modes that treat data tables separately. If calculation is set to Automatic Except for Data Tables, the rest of the workbook may recalculate while the data table remains unchanged until recalculated. Manual mode can also leave results out of date. Change calculation settings only if appropriate for the workbook, since they affect the broader calculation behavior.
Excel for Mac has the same general What-If Analysis concept, although menu placement and dialog details can differ by release. Excel for the web has limitations compared with the Windows desktop application for creating or managing some What-If Analysis features; if the Data Table command is unavailable or the dialog differs, open the workbook in the desktop Excel app.
Alternatives when a data table is unsuitable
If the model inputs and scenario grid must remain on separate sheets, or if you need a flexible report rather than a What-If Analysis table, consider using regular formulas that explicitly calculate each scenario. For a small number of cases, separate formula rows can be easier to audit. For larger scenario sets, a well-structured input table and formulas may be easier to maintain than a data table, provided the formulas are designed carefully.
Goal Seek is useful for a different question: it changes one input to reach a specified result. Scenario Manager stores named sets of input values for comparison. Neither tool is a direct replacement for a data table when you want a grid of results across many values, but they may suit a different kind of what-if question. Choose based on whether you need a result grid, a target input, or saved scenario sets.
Frequently Asked Questions
Can a data table use an input cell on another sheet?
No. The input cell supplied to the Data Table dialog must be on the same worksheet as the table. The formula can refer to other sheets, but the input cell itself must satisfy the same-sheet requirement.
Which box should I use for a vertical list of values?
Use Column input cell when test values run down the first column beneath the formula cell. Use Row input cell when test values run across the first row to the right of the formula cell.
Why does my data table show the same result in every cell?
Check whether the selected input cell is actually used by the result formula. Also confirm the row and column inputs are not reversed and that Excel is recalculating data tables. A valid reference alone does not guarantee that the model responds to the substituted values.
Can I type a range into the input-cell box?
No. Each input-cell box takes one model cell, such as B2. The scenario values belong in the worksheet grid and are included in the selected table range, not entered as a range in the dialog.
Does the data table permanently change my model input?
No. Excel temporarily substitutes each test value to calculate the results, then restores the original input. If a result seems not to update, check calculation settings and the formula’s relationship to the input cell.
Related
- Microsoft Word Remove Duplicates: Best Ways to Clean Text
- Microsoft Excel Workbook: What It Is and How to Use One
- Microsoft Excel .xlsx Files: Workbooks and Worksheets
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Errors & fixes
- Transpose Formula in Excel Not Working? FixesIf your Excel TRANSPOSE formula is not working, first check whether its output cells are clear and whether…
- UPPER Formula in Excel Not Working? Fix the CauseIf Excel’s UPPER formula is not working, first check that the function is spelled correctly and the formula…
- Excel Unable to Remove a Page Break? Find the Right FixIf Excel will not remove a page break, first check whether it is manual or automatic: select the…
- Excel DATEVALUE Not Working? Fix Common Date ErrorsIf Excel’s DATEVALUE formula is not working, the usual cause is that the cell does not contain date…
- Excel Text to Columns Not Working? Fix Common CausesIf Text to Columns is splitting data incorrectly—or not splitting it at all—select the source cells, go to…
- Hyperlink Not Working in Outlook? Fixes That HelpIf a hyperlink is not working in Outlook, first check whether Outlook is waiting for a Ctrl+click, then…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.