How to Create a Data Table in Excel

How to Create a Data Table in Excel

I discovered Excel’s Data Table feature while trying to figure out how a loan payment would change under different interest rates and loan terms, without manually recalculating the formula over and over. Instead of building dozens of separate calculations, I built one Data Table that instantly showed every combination at once. It’s one of those “what-if analysis” tools that feels like a hidden superpower once you know it exists.

What Is a Data Table?

A Data Table (found under Excel’s What-If Analysis tools) is a feature that lets you see how a formula’s result changes when you substitute different values into one or two input cells. It automatically calculates and displays the output for every combination of input values you specify, all in a neat grid — without you having to manually recreate the formula for each scenario.

This is different from a regular table of data you might type into a spreadsheet — a Data Table specifically refers to this sensitivity-analysis tool built into Excel.

When Should You Use a Data Table?

I use Data Tables when:

If you just need to compare a handful of fixed scenarios you’ve already calculated separately, you might not need a formal Data Table — but for exploring a full range of possibilities, it’s by far the fastest method.

Required Data Structure

For a one-variable data table, you need a formula, a column (or row) of input values to test, and an empty column/row where results will appear. For a two-variable data table, you need a formula, a row of one variable’s values across the top, a column of another variable’s values down the side, and the formula placed in the corner cell where the row and column headers meet.

Here’s an example setup for a two-variable loan payment table:

4%4.5%5%
=PMT formula
15 years
20 years
30 years

The interest rates run across the top row, loan terms run down the left column, and the PMT formula sits in the top-left corner cell of this range.

Step-by-Step Instructions

Here’s how I build a two-variable data table, which is the version I use most often:

  1. Set up your base formula in a cell — for example, =PMT(rate/12, term*12, -loan_amount) referencing specific input cells for rate, term, and loan amount elsewhere in your sheet.
  2. Place this formula in the top-left corner of your intended table range.
  3. Enter your row input values (e.g., different interest rates) across the top row, to the right of the formula cell.
  4. Enter your column input values (e.g., different loan terms) down the left column, below the formula cell.
  5. Select the entire range, including the formula cell, the row of values, and the column of values.
  6. Go to the Data tab.
  7. In the Forecast group, click What-If Analysis, then choose Data Table.
  8. In the dialog box, set the Row Input Cell to the cell your original formula references for the row values (e.g., the interest rate cell), and the Column Input Cell to the cell it references for the column values (e.g., the loan term cell).
  9. Click OK, and Excel fills in every combination automatically.

For a one-variable data table, you’d only fill in either the Row Input Cell or Column Input Cell, depending on whether your test values run across a row or down a column.

Formatting and Settings I Adjust

Once the table populates, here’s what I typically clean up:

A Practical Example

Say I’m evaluating a $300,000 mortgage. Using a two-variable data table with interest rates from 4% to 6% across the top and loan terms of 15, 20, and 30 years down the side, I instantly see all nine possible monthly payment combinations in one grid — without manually changing the formula nine separate times. That lets me compare, for instance, whether a 20-year loan at 4.5% has a similar payment to a 30-year loan at 5.5%, all at a glance.

Common Mistakes to Avoid

Mistakes I’ve run into:

Troubleshooting Tips

If your Data Table isn’t working correctly:

Real-World Use Cases

I’ve used Data Tables for:

Best Practices

Before I finalize a Data Table, I always check:

Data Tables are one of Excel’s most powerful but underused features for exploring “what if” scenarios without manually rebuilding formulas over and over. Once you get the Row Input Cell and Column Input Cell concept down, you’ll find yourself using this tool anytime you need to compare a formula’s outcome across a full range of possibilities at once.

Exit mobile version