sodcalculator

10 Tech How-To

Excel Data Tables: Which Input Setup Fits Your Analysis?

Guide 10-59750 · Updated · Step by step

Excel data tables let you see how changing one or two input values affects a formula’s result, and the right input setup depends on whether you are testing one variable or two. For a one-variable table, place the input values in a column (or row) and link the formula to the top of that column; for a two-variable table, put one set of inputs across a row and the other down a column, with the formula in the top-left corner. This article explains the two setups, when to use each, and how to avoid common mistakes.

Background: What Excel Data Tables Do

Excel’s Data Table feature (part of What-If Analysis) recalculates a formula many times, each time substituting a different input value. It is a quick way to perform sensitivity analysis—seeing how profit changes with price, how monthly payment changes with interest rate, or how total cost changes with quantity. Unlike manually copying formulas, a data table stores all results in one array and updates automatically when you change the formula’s inputs.

The feature has existed for decades and is still in modern Excel (Windows and Mac). It works with any formula that depends on one or two input cells. The key is that the formula must reference the input cell(s) directly—not typed values.

How a One-Variable Data Table Works

A one-variable data table tests a single input across many values. You set up a column of test values (e.g., 100, 200, 300) and a formula that uses one of those values as the input. Excel runs the formula for each value and fills the results next to the column.

To build it:

  1. Type the test values in a column (say, B5:B9).
  2. Place the formula one cell above and one cell to the right of the first test value (e.g., C4). The formula must reference the input cell (e.g., =B2*10).
  3. Select the range including the formula and the test values (B4:C9).
  4. Go to Data > What-If Analysis > Data Table.
  5. In the Column input cell box, enter the input cell (e.g., B2). Leave Row input cell blank.

Excel fills the results in C5:C9. For a row-based setup, place test values across a row, put the formula one cell below and one cell left of the first value, and use the Row input cell box instead.

How a Two-Variable Data Table Works

A two-variable data table tests two inputs simultaneously. You place one set of values across a row and another down a column. The formula sits in the top-left corner of the table, and it must reference both input cells.

Setup steps:

  1. Type one set of values across a row (e.g., D4:F4) and another set down a column (e.g., C5:C9).
  2. Put the formula in the corner cell (C4), referencing both input cells (e.g., =B2*B3).
  3. Select the entire block (C4:F9).
  4. Open Data Table and enter the row input cell (for the row values) and the column input cell (for the column values).

Excel fills the grid with results for every combination of the two inputs. This is ideal for a two-factor sensitivity table, like seeing how profit varies with both price and cost.

Choosing the Right Setup for Your Analysis

Ask yourself: how many inputs do you need to vary? If only one, use a one-variable table. If two, use a two-variable table. For three or more, you cannot use a single data table—you would need multiple tables or a different tool like Scenario Manager.

Also consider the layout that matches your report. A one-variable table can be vertical (column of inputs) or horizontal (row of inputs). Choose the orientation that fits your worksheet. A two-variable table is always a grid, with the formula in the corner.

Practical examples:

  • Loan payment vs. interest rate – one-variable table with rates in a column.
  • Profit vs. price and cost – two-variable table with prices across the top and costs down the side.
  • Break-even quantity vs. fixed cost – one-variable table with fixed costs in a row.

Common Problems and How to Fix Them

Data tables often fail for a few reasons:

  • Formula not referencing the input cell. The formula must contain a reference to the input cell. If you type a value instead, the table will repeat the same result.
  • Wrong input cell in the dialog. For a column setup, the column input cell must be the cell that the formula uses for the column values. For a row setup, it’s the row input cell.
  • Selecting the wrong range. The selected range must include the formula cell and all test values, but not extra blank cells.
  • Table results are in an array. You cannot delete or edit a single result cell. Select the whole table range and press Delete to clear it.
  • Volatile recalculation. Data tables recalculate every time the workbook recalculates, which can slow down large files. To control this, set calculation to manual and press F9 when needed.

Comparing Data Tables with Other What-If Tools

Excel offers several what-if tools, and each fits different needs:

  • Data Table – best for showing a range of results for one or two inputs. It gives a full grid of outcomes at once.
  • Scenario Manager – lets you save and switch between named sets of input values (e.g., Best Case, Worst Case). It does not show a continuous range, only the scenarios you define.
  • Goal Seek – finds the single input value that produces a target result. It works backward from a desired output.
  • Solver – finds optimal values for multiple inputs subject to constraints. It is more powerful but requires the Solver add-in.

For a quick sensitivity grid, a data table is usually the fastest. For comparing a few discrete scenarios, Scenario Manager is cleaner. For finding a specific target, Goal Seek is the tool.

Limitations and Best Practices

Data tables have limits you should know:

  • They only handle one or two inputs. For more, you need multiple tables or a different approach.
  • They are not dynamic in the sense of adding rows automatically. If you change the number of test values, you must rebuild the table.
  • They can be slow with thousands of rows because every result is recalculated.
  • They do not work with array formulas that spill (in older versions) or with data models.

Best practices:

  • Keep the formula simple and reference input cells clearly.
  • Label the rows and columns so the table is readable.
  • Use absolute references for constants in the formula if needed.
  • If the table is large, consider using a PivotTable or Power Query for a more flexible solution.

Frequently Asked Questions

Why does my data table show the same value in every cell?

This usually means the formula does not reference the input cell. Check that the formula contains a reference to the cell you entered in the Column input cell or Row input cell box. If the formula uses a constant, the table has nothing to vary.

Can I use a data table with more than two variables?

No, a single data table supports at most two inputs. For three or more, you can create multiple tables, use Scenario Manager, or write a custom VBA macro to loop through combinations.

How do I change the input values after creating the table?

Simply edit the test values in the row or column. The table will recalculate automatically (unless calculation is manual). You cannot change the formula or the input cell references without rebuilding the table.

Why is my data table not updating when I change a source value?

Check if calculation is set to manual. Press F9 to recalculate. Also ensure the source cell is truly an input to the formula—if the formula references a cell that is not the input cell, the table won’t respond.

Can I use a data table with a formula that references another sheet?

Yes, the formula can reference cells on other sheets. Just make sure the input cell you specify in the dialog is the one the formula actually uses, even if it’s on a different sheet.

Is there a way to make a data table dynamic (auto-expand)?

Not directly. You can use Excel Tables for the input range, but the data table range itself is fixed. To handle a changing number of inputs, you would need to recreate the table or use a dynamic array formula with SEQUENCE and BYROW (in newer Excel versions).

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →