How to Do a Data Table in Excel

Last updated on November 9th, 2026 at 01:39 pm

To do a data table in Excel, build a formula that depends on one input cell, list the values you want to test down a column, put a reference to the formula one row above and one column to the right of the first value, select that block, and go to Data > What-If Analysis > Data Table. Enter the input cell in the Column input cell box and click OK. Excel fills in one result for every value in your list.

Applies to: Excel for Microsoft 365 on Windows, Excel 2024, 2021, 2019 and 2016, which are the versions listed on Microsoft’s page on calculating multiple results with a data table. Excel for Mac has the same command under the Data tab. This guide focuses on the one-variable data table and summarizes the two-variable version.

What a data table does (and what it isn’t)

A data table is one of Excel’s What-If Analysis tools. It takes a formula you already have, swaps a list of different values into one of the formula’s inputs, and shows every result side by side. Instead of typing five interest rates into the same cell one after another and writing down each payment, you see all five payments at once.

The name causes confusion, because Excel also has a feature simply called a “table.” The two are unrelated:

Data table (What-If Analysis)Excel table (Ctrl + T)
PurposeShows how a formula’s result changes as one or two inputs changeFormats and manages a list of records
Where to find itData > What-If Analysis > Data TableInsert > Table, or Ctrl + T
What you seeA block of calculated results with the formula {=TABLE()}Filter buttons, banded rows, a Table Design tab

If you wanted the second kind, see the steps for making a table in Excel with multiple columns and rows, and how to undo a table in Excel when you want a plain range back. The rest of this page is about the What-If kind.

How is a data table different from Goal Seek?

A data table runs forward: you give it inputs and it shows many results. Goal Seek runs backward from one result you want, such as a $450 payment, to find the single input that produces it. Both are explained in this walkthrough of What-If Analysis in Excel, along with Scenario Manager.

Before you start: three terms

  • Input cell: the single cell on your sheet that the formula reads, such as an interest rate. The data table temporarily replaces its value with each test value. Your original value stays in place.
  • Formula cell: the cell at the top of the result column (or the left of the result row) that points to the formula you want to watch, for example =B4.
  • Column input cell vs. row input cell: these are the two boxes in the Data Table dialog. Use Column input cell when your test values run down a column, and Row input cell when they run across a row. A one-variable table uses only one of the two boxes.

The input cell must be on the same worksheet as the data table. Microsoft describes a data table as showing its outcomes “in one table on one worksheet,” and Excel generally refuses an input cell on another sheet.

Can I type the TABLE formula myself?

Not in any useful way. {=TABLE()} is written by Excel when you use the Data Table dialog, and Excel generally rejects it if you type it into a cell. Rerun the dialog instead.

Set up the example model

This example works out the monthly payment on a $25,000 car loan. Type the labels in column A and the values in column B:

CellLabel (column A)Value (column B)
B1Loan amount25000
B2Annual interest rate6%
B3Term (months)60
B4Monthly payment=PMT(B2/12,B3,-B1)

B4 should show $483.32. The rate is divided by 12 because payments are monthly, and the loan amount has a minus sign so the payment comes out positive. Check that this formula gives a sensible answer before you build the table, because the table can only be as right as the formula behind it.

How to create a one-variable data table

You’ll test five interest rates against the payment formula.

  1. List the test values in a column. Click D3 and type 4%, 5%, 6%, 7% and 8% in D3:D7. Leave column E empty next to them; that’s where the results will go.
  2. Point to the formula. Click E2, which is one row above and one column to the right of the first rate, and type =B4. E2 shows $483.32, the payment at the current 6% rate. If you want headings, put them in D1 and E1, but leave D2 itself blank.
  3. Select the whole block. Drag from D2 to E7 so the selection includes the blank corner cell, the formula cell, the five rates and the five empty result cells.
Excel sheet with a loan payment model and the range D2:E7 selected, including the formula cell E2 and rates in D3:D7
Select D2:E7, including blank D2, =B4 in E2, and the five rates in D3:D7. The fictional $25,000, 6%, 60-month model returns $483.32 before the table is calculated.
  1. Open the Data Table dialog. On the Data tab, select What-If Analysis, then Data Table. In Excel for Microsoft 365 the What-If Analysis button usually sits in the Forecast group near the right end of the ribbon; Microsoft notes some versions place it in the Data Tools group. A small dialog with two boxes opens.
  2. Enter the input cell. Click in the Column input cell box and then click cell B2 (the interest rate). The box shows $B$2. Leave Row input cell empty, because the rates run down a column.
Data Table dialog in Excel with Column input cell set to $B$2 and Row input cell left empty
For rates listed down a column, leave Row input cell blank and set Column input cell to $B$2. The What-If menu closes when the Data Table dialog opens; this recreation does not combine both open menus.
  1. Click OK. Excel fills E3:E7 with a payment for each rate.
  2. Format the results. With E3:E7 selected, choose Home > Currency (or Accounting) so the payments are easy to read.

Your finished table should match this:

Rate (D)Monthly payment (E)
4%$460.41
5%$471.78
6%$483.32
7%$495.03
8%$506.91

The 6% row should equal the payment in B4. That match is your quickest check that the table is wired to the right input cell.

Does it work for savings, not just loans?

Any formula with a single input cell works. Swap the PMT model for a savings projection, list growth rates, and point the column input cell at the rate, the same way you would when you calculate compound interest in Excel.

How to confirm it worked

  • Click any result, such as E5. The formula bar shows {=TABLE(,B2)}. The curly braces mean Excel created an array formula; the blank before the comma means no row input cell was used.
  • Change the loan amount in B1 to 30000. Every result updates (the 6% row becomes $579.98), and B2 still says 6%.
  • If all five results are identical, or show your rates instead of payments, jump to Troubleshooting.
Completed one-variable data table with monthly payments for 4% to 8% and the formula bar showing {=TABLE(,B2)}
The selected E5 result uses {=TABLE(,B2)}. Its 6% payment matches B4 at $483.32; the five independently checked results are $460.41, $471.78, $483.32, $495.03, and $506.91.

Lay the values across a row instead

Some models read better with the test values running left to right. The rule flips: the formula reference goes one column to the left of the first value and one row below.

  1. Type the rates 4% to 8% in E1:I1.
  2. In D2, type =B4.
  3. Select D1:I2.
  4. Go to Data > What-If Analysis > Data Table, enter B2 in the Row input cell box, leave Column input cell empty, and click OK.

The payments appear in E2:I2, with the same values as the column version. Pick whichever layout fits the space on your sheet; the math is identical.

Show more than one result per value

A one-variable table can track several formulas at once, as long as they all depend on the same input cell. For a column table, add each extra formula reference to the right of the first one in the top row. For a row table, add them below the first one.

To add total paid and total interest to the example:

  1. In F2, type =B4*B3 (total paid). In G2, type =B4*B3-B1 (total interest).
  2. Select D2:G7.
  3. Open Data Table again, enter B2 as the Column input cell, and click OK.

At 4% you’ll see $27,624.78 paid and $2,624.78 in interest; at 8% it’s $30,414.59 and $5,414.59. If you already built the two-column table, Microsoft’s instructions say you can type the new formula next to the existing one, select the old table plus the new column, and run Data Table again.

When you need two variables

A data table can vary at most two inputs. For two, put the formula reference in the top-left corner of the block, one set of values across the top row and the other down the first column, then fill in both boxes: Row input cell for the values across the top and Column input cell for the values down the side.

With the same loan, terms of 36, 48 and 60 months across the top (row input B3) and rates of 5%, 6% and 7% down the side (column input B2) give payments from $471.78 (5%, 60 months) up to $771.93 (7%, 36 months). The full walkthrough is in creating a two-variable data table in Excel, and the same grid is the basis of a sensitivity table. For three or more inputs, use Scenario Manager or several separate tables.

Edit, keep or delete the results

Because the whole result range is one TABLE array, Excel treats it as a single unit:

  • To test different values, type over the values in the input column (D3:D7). The results recalculate. You don’t need to rebuild the table.
  • To change what’s being calculated, edit the formula in B4 or the reference in E2.
  • You can’t edit or clear one result cell. Trying it brings up a message along the lines of “Cannot change part of a data table.” Press Esc to back out.
  • To delete the results, select all of them (E3:E7, or E3:G7 if you added formulas) and press Delete. To remove everything, select the whole block including the rates and the formula cell.
  • To keep the numbers as plain values, select the results, press Ctrl + C, click an empty cell, and choose Home > Paste > Paste Values. The copy won’t change when the model changes, which is handy for a report snapshot.

Stop large data tables from slowing Excel down

Data tables recalculate every time the worksheet recalculates, even if nothing they use has changed. A handful of rows is no problem, but tables with hundreds of rows or heavy formulas can make every edit lag.

  1. On the Formulas tab, select Calculation Options.
  2. Choose Automatic Except for Data Tables. Ordinary formulas keep updating as you work, but data tables stop.
Excel Formulas Calculation Options menu with Partial highlighted, the current Windows desktop label for excluding data tables from automatic recalculation
Current Excel for Windows calls this mode Partial. It recalculates other formulas while leaving data tables (and Python formulas) for manual recalculation. Some versions use the older label Automatic Except for Data Tables. This recreation changes no calculation setting.
  1. When you want fresh results, select the table’s result cells and press F9, as Microsoft’s data table page recommends.

The same setting is available under File > Options > Formulas > Calculation options. Remember you changed it: the most common reason a data table “stops working” is that this option, or Manual, is still turned on. Microsoft’s page on changing formula recalculation in Excel explains each calculation mode. Switch back to Automatic to undo the change.

Every result the same

Every result is the same number

The input cell you chose isn’t one the formula uses. In the example, picking B3 (term) while listing rates gives five copies of $483.32. Delete the results and run Data Table again with the correct input cell. Also check that the formula refers to the input cell itself, not to a typed number like 0.06.

The results column shows your input values or zeros

The formula reference is missing or in the wrong spot. For a column table it must sit one row above and one column to the right of the first test value; for a row table, one column to the left and one row below. Also check that you selected the corner cell and the formula row before opening the dialog.

“Input cell reference is not valid”

This usually means the input cell is on a different worksheet, or you typed something that isn’t a single cell. Put the data table on the same sheet as the model. If the model must live elsewhere, add a cell on the table’s sheet that the model’s formula reads.

Results don’t update

Calculation is set to Automatic Except for Data Tables or to Manual (see the calculation setting). Press F9 or switch back to Automatic.

Data Table is grayed out or missing

Press Esc in case you’re still editing a cell, and check whether the sheet is protected (Review > Unprotect Sheet). Microsoft’s data table page lists only desktop versions of Excel, so if you’re working in a browser and can’t find the command, open the file in the desktop version of Excel.

How many values can a one-variable data table test?

As many as you want. Microsoft says a data table can use as many different variable values as you like, while Scenario Manager is limited to 32 values per scenario. The practical limit is speed, which is what the calculation setting above is for.

Try replacing the rates in D3:D7 with the ones a lender actually quoted you, or turn on Automatic Except for Data Tables before you scale the table up to dozens of rows. When you’re ready to compare rate and term together, move on to a two-variable table.