Sub topic 9
Reading the TABLE Array Formula and Its Editing Limits
This chapter assumes you can build a one-variable and a two-variable data table, that you know the difference between a row input cell and a column input cell, and that you are comfortable with absolute and relative references. Here you will learn what Excel writes into the result cells of a data table, how to read it, and which edits Excel allows and which it blocks.
What Excel writes into the grid
When you click OK in the Data Table dialog, Excel does not fill the result cells with numbers. It fills them with a single array formula that covers the whole result range. In the formula bar it looks like this:
{=TABLE(B3,B2)}The curly braces mean the formula is an array formula. In most array formulas you type them with Ctrl+Shift+Enter. For a data table, Excel adds them for you, and you cannot type them yourself.
TABLE is not a normal worksheet function. It does not appear in the function list, you cannot type =TABLE(...) into a cell, and it has no help page that you can open from the formula bar. It is a marker that tells Excel "this range is a data table, and these are its input cells."
The two arguments
TABLE takes two arguments, and their position matters.
{=TABLE(row_input_cell, column_input_cell)}- The first argument is the row input cell. It is the cell that receives the values from the top row of the table.
- The second argument is the column input cell. It is the cell that receives the values from the left column of the table.
- An empty position means that axis is not used.
The three table shapes you have seen map to these forms:
| Table type | What you entered in the dialog | Formula shown in the result cells |
|---|---|---|
| One-variable, values down a column | Column input cell: B2 | `{=TABLE(,B2)}` |
| One-variable, values across a row | Row input cell: B2 | `{=TABLE(B2,)}` |
| Two-variable | Row input cell: B3, column input cell: B2 | `{=TABLE(B3,B2)}` |
The leading comma in {=TABLE(,B2)} is how Excel shows an empty first argument. It is easy to misread. If you see a comma before the cell, the table is column-oriented and only the column input is set.
You can use this as a quick audit. If you inherit a workbook and want to know which model inputs a table drives, click any result cell and read the formula bar. The cell references in TABLE are the actual input cells.
How the formula produces the numbers
Excel evaluates the table with a substitution loop. For each result cell, it does the following:
- Take the value from the matching header in the left column, the top row, or both.
- Temporarily place that value in the input cell or cells named in TABLE.
- Recalculate the model.
- Read the output formula in the corner or header position.
- Store the result in the grid cell and restore the original input.
Your input cells never permanently change. After the table calculates, B2 still holds 6.5% (or whatever you had), not the last value from the table.
The diagram shows the flow for one result cell in a two-variable table.
This explains why the output formula must depend on the input cells. If the chain from input to output is broken, the substitution has no effect and every grid cell shows the same number. The earlier chapter on input cell rules covers this in detail.
The result range is one object
Because the result cells hold a single array formula, Excel treats them as one block. This has practical consequences for editing.
What you cannot do
If you try any of the following on part of the result range, Excel shows the message "Cannot change part of a data table":
- Type a value or formula into one result cell.
- Delete the contents of one result cell, or of a few of them.
- Insert a row or column inside the result range.
- Delete a row or column that passes through the result range.
- Cut or move part of the result range.
- Edit the TABLE formula in the formula bar.
The restriction applies to every cell in the grid, including the ones in the middle. There is no way to override a single result, which is a deliberate guard: a hardcoded number in the grid would look like a model output and would not move when inputs change.
What you can do
You can work with the block as a whole, or with the cells around it.
- Select the whole result range and press Delete. This removes the TABLE formula and leaves an empty range. The row and column headers and the corner formula remain.
- Copy the result range and paste as values. Do this when you want a static snapshot, for example to paste into a presentation or to compare against a later run. The pasted numbers are plain constants, so they no longer update.
- Change the headers. The values in the top row and left column are normal cells. Edit them and the table recalculates with the new values.
- Change the corner formula or the header formula. For example, point the corner cell at a different output. The grid updates.
- Format the cells. Number formats, fills, borders, and conditional formatting all work on the result range.
- Move or copy the entire table, including its headers. If you cut and paste the whole block to a different place on the same sheet, the TABLE references keep pointing at the same input cells.
- Copy the result cells as a reference source. Other formulas can refer to individual result cells, such as
=E5or=INDEX(E3:I7, 3, 3).
Changing the table's shape or inputs
You cannot edit TABLE in place, so to change an input cell or enlarge the grid, you rebuild the table:
- Select the whole result range (not the headers).
- Press Delete.
- Adjust the headers or add new rows and columns as needed.
- Select the full block, including the corner and header cells.
- Open Data > What-If Analysis > Data Table and enter the input cells again.
Rebuilding takes less than a minute, so do not look for a workaround.
Reading TABLE alongside the model
A good habit is to check the formula against the model when you open someone else's workbook. Take this loan example.
B1: 300000 (Loan amount)
B2: 0.065 (Annual interest rate)
B3: 30 (Term in years)
B4: =PMT(B2/12, B3*12, -B1) (Monthly payment, the output)Suppose the table sits in D2:I7, with the output in D2, the years across the top, and the rates down the left side. The result range E3:I7 shows:
{=TABLE(B3,B2)}Read it left to right, matching the argument positions:
- First argument B3 is the term. The top row (E2:I2) holds years, so this is correct.
- Second argument B2 is the rate. The left column (D3:D7) holds rates, so this is also correct.
If the two were swapped, you would see {=TABLE(B2,B3)}. Excel would then put 10, 15, 20 and so on into the rate cell and 4.5%, 5.5% and so on into the term cell. The result would be a grid of nonsense: a rate of 1000% and a term of 0.045 years. Excel does not warn you. Reading the formula catches this error before you see the numbers.
Where the formula behaves in surprising ways
A few behaviors are worth knowing.
- Every result cell shows the same formula. Click E3, then I7. The formula bar shows the identical
{=TABLE(B3,B2)}for both. The formula is one object, so this is normal and not a copy error. - Highlighting the range shows the extent. Select one result cell and press Ctrl+/ (Control and forward slash). Excel selects the entire array, which is a quick way to see how large the table is.
- Find and Replace does not edit it. Searching for
TABLEin formulas will find it, but you cannot replace text inside it. - The input cells must be on the same sheet. The dialog rejects an input cell on another sheet with "Input cell reference is not valid." The TABLE formula only stores references to cells on its own sheet. To drive an input on another sheet, place a link on the table's sheet and make the other sheet's input cell point to it.
- Results depend on the calculation mode. If you use Automatic except for Data Tables, the grid does not refresh until you press F9. The next chapter covers this.
Checking your understanding
Exercise
A colleague sends a workbook with a table whose result cells all show {=TABLE(,C4)}. The left column holds 8 discount rates and the top row is empty. They say they want to vary both the discount rate and the growth rate, and that the grid shows only one column of numbers. What does the formula tell you about the table, and what must they do to fix it?
Show answer
The formula shows an empty row input and C4 as the column input, so this is a one-variable, column-oriented table that substitutes only the left-column values into C4. Nothing is wrong with the formula itself, but it cannot vary a second input. To vary both, they must select the whole result range and delete it, put the growth rates across the top row, put the output formula in the top-left corner cell, select the full block, and open the Data Table dialog again. They enter the growth rate input cell as the Row input cell and the discount rate cell (C4) as the Column input cell. The new formula will read {=TABLE(growth_cell,C4)}.
Exercise
You click cell G5, which sits in the middle of a data table's result range, and type 0 to override one result. What happens, and how do you get a hardcoded snapshot of the table instead?
Show answer
Excel refuses the edit and shows "Cannot change part of a data table." To get a snapshot, select the whole result range, copy it, and use Paste Special > Values, either over the same range after deleting the table or in another location. The pasted cells are constants and no longer respond to input changes.