Excel What-If Data Tables: One- and Two-Variable Setup

โฑ๏ธ 3 min read ๐Ÿ“Š Excel

A What-If Data Table recalculates one formula for every value in a list of test inputs (one-variable) or every combination of two lists (two-variable), producing a full sensitivity grid in a single operation instead of copy-pasting the formula manually for each scenario.

Quick answer: Build a one-variable table by listing test inputs down a column, referencing your formula in the top-right corner cell, selecting the whole block, then Data > What-If Analysis > Data Table, and setting Column Input Cell to the input your list varies. Data Tables recalculate on every workbook calculation by default (not just when you edit them), which can slow down a large file โ€” switch calculation to manual, or set the Data Table itself to Automatic Except for Data Tables, if it drags.

How do I build a one-variable Data Table?

List your test values down a column, put a reference to the result formula in the cell one row up and one column to the right of that list, select the full rectangular block, then tell Excel which input cell the list represents.

Setup for a 30-year, $250,000 mortgage:
B1: Loan Amount = 250000
B2: Rate = 6%
B3: Years = 30
B4: =PMT(B2/12, B3*12, -B1)     ' Monthly payment formula

Data Table layout:
      D          E
1                =B4    โ† reference to the formula, top-right corner
2     5.0%
3     5.5%
4     6.0%
5     6.5%
6     7.0%

1. Select D1:E6
2. Data > What-If Analysis > Data Table
3. Column Input Cell: B2   (the rates in column D feed into B2)
4. OK

Excel fills column E with the payment at each rate:

Rate   Monthly Payment
5.0%   $1,342
5.5%   $1,419
6.0%   $1,499
6.5%   $1,580
7.0%   $1,663

Those numbers come directly from =PMT(rate/12, 360, -250000) at each rate โ€” you can verify the 6% row yourself: =PMT(0.06/12,360,-250000) returns 1498.88.

How do I build a two-variable Data Table?

Put the formula reference in the single top-left corner cell of the block, one variable's test values down the column below it, the other variable's test values across the row to its right, then select the entire block including both lists and the corner formula.

Layout:
      D          E         F         G
1     =B4       15 yrs    20 yrs    30 yrs   โ† Years across the top
2     5.0%
3     6.0%
4     7.0%
   โ†‘
Rates down the left

1. Select D1:G4
2. Data > What-If Analysis > Data Table
3. Row Input Cell: B3      (Years โ€” matches the row of headers)
4. Column Input Cell: B2   (Rate โ€” matches the column of headers)
5. OK

Excel fills the whole grid: payment for every rate/years combination in one operation, with the single formula in the corner driving every cell.

What is sensitivity analysis, and why use a Data Table for it?

Sensitivity analysis means testing how much a result changes when one input changes, holding everything else fixed โ€” a Data Table does this exhaustively across a whole range of inputs at once, rather than you manually typing one input, reading the result, retyping, and repeating.

For a comparison of Data Tables against the other two What-If tools โ€” Goal Seek (reverse-solve for one input) and Scenario Manager (save named sets of many inputs) โ€” see What-If Analysis: 3 tools and when to use each. For more worked setups (loan payments, sales forecasts, investment returns), see Excel Data Tables for What-If Analysis.

Why does a Data Table slow down a large workbook?

Every cell inside a Data Table is really an array formula built on {=TABLE(row_input, column_input)}, and by default Excel recalculates every one of those cells on every workbook calculation โ€” not just when the Data Table's own inputs change, but whenever anything anywhere in the workbook recalculates. A 20x20 two-variable table means 400 full recalculations of your underlying formula on every keystroke that triggers recalc.

Fix 1 โ€” recalc setting scoped to Data Tables only:
Formulas tab > Calculation Options > Automatic Except for Data Tables
(Data Tables then only recalc on F9 / Calculate Now, everything else stays live)

Fix 2 โ€” manual calculation for the whole workbook:
Formulas tab > Calculation Options > Manual
(press F9 to recalculate everything when you're ready)

Common mistakes with Data Tables

Most Data Table errors come from a misplaced formula reference or mixed-up input cells, both of which produce a table that looks fine but contains the wrong numbers.

Pro Tip: If you only need to see one specific input/output pairing rather than the full grid, Data Tables are overkill โ€” Goal Seek or a plain formula with a hard-coded input is faster to build and doesn't carry the recalculation cost of a full sensitivity grid.

โ† Back to Excel Tips