Sub topic 3
How an Excel Data Table Works
Prerequisites and purpose
This chapter assumes that you know basic Excel navigation, cell references, percentages, and simple financial-model formulas. You should also understand absolute references such as $B$2 and relative references such as B2.
A sensitivity table shows how one output changes when one or two model inputs change. Excel's Data Table feature, found under Data > What-If Analysis, creates this grid by temporarily replacing input values, recalculating the model, and recording the output.
A data table does not create a separate model. It repeatedly tests the existing model. Therefore, the output must depend on the input cell being tested.
The model behind the table
Start with a small loan model:
B1: 300000
B2: 0.065
B3: 30
B4: =PMT(B2/12, B3*12, -B1)Here, B1 is the loan amount, B2 is the annual interest rate, and B3 is the term in years. Cell B4 calculates the monthly payment.
The model has three useful parts:
- Inputs are values that a user can change, such as the interest rate.
- Calculations use formulas to process those inputs.
- Outputs show the result to analyze, such as the monthly payment.
The data table connects a range of test values to one output formula. It then places the recalculated results beside or below those values.
One-variable data tables
A one-variable data table changes one input while keeping all other inputs unchanged.
For a column-oriented table, place the test values down a column. Put a reference to the output formula one row above and one column to the right:
D2: blank
E2: =B4
D3:D7: 0.045, 0.055, 0.065, 0.075, 0.085Select D2:E7, then choose Data > What-If Analysis > Data Table. Leave Row input cell empty. Set Column input cell to B2, because the values in column D represent different interest rates.
Excel replaces B2 with each rate, recalculates B4, and writes the payment in E3:E7.
A row-oriented table works the same way, but the test values run across a row. In that layout, use the Row input cell field and leave Column input cell empty.
Two-variable data tables
A two-variable table changes two inputs at once. One input appears across the top row, and the other appears down the first column.
For example:
D2: =B4
E2:I2: 10, 15, 20, 25, 30
D3:D7: 0.045, 0.055, 0.065, 0.075, 0.085Select D2:I7 and create a data table. Set:
- Row input cell:
B3, because the term values run across the top. - Column input cell:
B2, because the interest rates run down the side.
Excel tests every rate-and-term combination and fills the interior grid.
The input cells must be real model inputs. If the output formula does not depend on an input, changing that input cannot change the result. The table and its input cells should also be on the same worksheet.
What Excel stores
After creating a data table, selecting a result cell may show a formula such as:
{=TABLE(B3,B2)}TABLE is Excel's internal array formula for the data table. You generally do not type or edit it directly. Excel controls the table range as one object, so changing an individual result cell is restricted. To change the table, select its full range and recreate or resize it.
Exercise
A two-variable table has term values across the top and interest rates down the side. Which input cells should you select?
Show answer
Set Row input cell to the model's term cell and Column input cell to the model's interest-rate cell.