Data Table In Excel : One Variable and Two Variable
Last Updated :
26 Aug, 2025
Data tables can be used to replace the values of a formula present in the sheet with the values present in either the column or row of any table. With data tables, one can replace at most two values in the formula present in the sheet.
- Dynamic Analysis: Automatically updates results when input values or formulas change.
- Comparative Insights: Displays multiple outcomes in a tabular format for trend identification.
- Efficient Testing: Eliminates manual recalculations by testing multiple input values at once.
- Versatile Integration: Works with charts, PivotTables, or other Excel features for enhanced analysis.
For example, we can see in the below figures there is an Excel sheet that is used to calculate simple interest over a given amount for a given number of years for a given rate of interest per annum. With the help of a data table, we can calculate the interest for the same amount with different numbers of years and with different rates of interest. We can also calculate the interest for different amounts for different numbers of years for a fixed rate of interest very easily.


1. Creating a One-Variable Data Table
1.1 One Variable Data Table
In a one-variable data table, only one of the formula values is replaced with the row or column values of a table of data.
For Example:
Let us say we want to find interest on the principal amount of the loan for 4 years for various interest rates, we can do this by placing the interest rates in either the row or column of a table and then using the data table we can replace the interest rate values with the row or column values, in the example below, we have placed the variables in the column of a table. The cell containing the formula is placed in the top right corner which contains empty cells for storing the calculated interest but do remember to keep the cells containing the other values in the formula linked with the cell containing the formula. The process is done as shown below:

The top right cell is the cell that contains the formula for simple interest and it is linked with the cells containing the value of principal amount, number of years, and interest rate. The formula is =B3*B4*B5.

To use the data table tool, we need to select the table with all the inputs and the cell containing the formula. Go to what-if analysis, and select Data Table. A Data-Table dialogue box appears. Add, Column Input cell value as $B$5. Click Ok.

Step 3: Follow the Above Step for Row
If the variable interest rates our kept in the rows then we would have done the same thing but instead of putting B5 in the column input, we would have placed it in the row input. Below, are shown the values of Interest in the excel sheet.

2. Two-Variable Data Table
In a two-variable data table, two of the formula values are replaced with the row and column values of a table of data. Two is the maximum number of values that can be used as variables in a data table since the values are replaced with row and column values which is a 2-D structure.

For Example:
Let us say we want to find interest on the principal amount of the loan for various numbers of years along with various interest rates, we can do this by placing the interest rates in either the row or column of a table and placing the numbers of years in the other row or column of the table mentioned before, then using the data table we can replace the interest rate values with the row or column values and numbers of years with the other row or column, in the example below we have placed the interest rate variables in the column and numbers of years variable in the row of a table. The cell containing the formula is placed in the top left corner. Do remember to keep the cells containing the principal amount in the formula linked with the cell containing the formula. The process is done as shown below:
The top left cell is the cell that contains the formula for simple interest and it is linked with the cell containing the value of the principal amount. The formula is =B3*B4*B5.

Step 2: Select Data Table and Fill Details Followed by Pressing OK
To use the data table tool, we need to select the table with all the inputs and the cell containing the formula. Go to what-if analysis, and select Data Table. A Data-Table dialogue box appears. Add, Column Input cell value as $B$5, and Row input cell value as $B$4. Click Ok.

Step 3: Interchange Values
We can interchange the values in the rows and columns but accordingly we have to change the row and column input values in the data table. Below, are shown the values of interest for the various number of years.

3. How to Delete a Data Table in Excel
Excel does not allow deleting values in individual cells containing the results. Whenever we try to this, an error message "Cannot change part of a data table" will show up:
we can easily clear the entire array of the resulting values. Here's how:
1. Selection Precision
Depending upon our requirements, meticulously highlight either the entire range of data table cells or specifically focus on cells harboring the results we seek to obilerate.
2. The Eloquent Keystroke
With our selection poised and ready, summon the "Delete" key with a decisive press. They array of data table values we've chosen shall bow to our command and vanish, leaving behind a blank canvas.
4. How to Edit Data Table Results
It is not possible to change the part of an array in Excel, we cannot edit individual cells with calculated values. we can only replace all those values with our own one by performing these steps:
Step 1: Select all the resulting cells.
Step 2: Delete the TABLE formula in the formula bar.
Step 3: Type the desired value, and press Ctrl +Enter.
5. How to Recalculate Data Table Manually
When dealing with a hefty data table filled with numerous variable values and complex formulas, we might notice our Excel application slowing down. But now we can follow the below step to recalculate data table manually:
Step 1: Go to the Formulas Tab.
Step 2: Now select the Calculation Group.
Step 3: Then Click Automatic Except Data Tables.
.png)
This will turn off data table calculations and speed up recalculations of the entire workbook.
To manually recalculate our data table, Select the cells with TABLE() formulas, and press F9.
6. Data Table to Compare Multiple Results
Imagine having the ability to gather insights from not just one, but multiple formulas all in one go. With our data table as the canvas, we can now embark on a journey of formulaic exploration like never before.
Expanding the horizons of our data table is a simple as it sounds. If our data table is organized vertically in columns, we can add new formulas to the right of the existing ones. On the other hand, if our data table is organized horizontally in rows, the additional formula find their place just below the first one.
For the "multi-formula" data table to work correctly, all the formulas should refer to the same input cell.
7. Data table in Excel : Things to Remember
- Precision in Selection: Data tables empower we to cherry-pick input values that align perfectly with our business needs. By handpicking these values, we optimize outcomes and harness the potential of our formulas.
- Insights Through Comparison: A data tables serves as our comparisons in giving different outputs. Through its consolidated presentation, we gain a panoramic view, enabling insights comparisons that unveil patterns, trends, and possibilities.
- Immutable Tabular Presentation: The results are unveiled before we on a steadfast tabular format. This steadfastness, through, comes with a twist- the outcomes are resolute and cannot be altered or undone with a swift "Ctrl +Z" shortcut. Only the deliberate act of selection followed by the "Delete" key wields the power to erase.
- The Orchestra of TABLE Formulas: Enter the arena of TABLE array formulas, the magicians behind the scenes. For precision, the "row input cell" and the "Column input cells" must be chosen thoughtfully, asking t fine-tuning an instrument. Their shared stage? The same worksheet as the data table, a crucial harmony for accurate results.
- The Dynamic Aura: Unlike Pivot tables that requires a refresh, Excel data tables pulsate with dynamic life. A mere shift in source dataset values or formulas sparks an automatic update, ensuring our insights remain current and vibrant.
How to Create a one-variable data table in Excel?
To create a one-variable data table, follow these steps:
Step 1: Set up our input cells with the desired formulas.
Step 2: Create a column or row of values that we want to test as inputs.
Step 3: Select the range of cells that includes both the input cells and the formula cell.
Step 4: Go to the "Data" tab, click on "What-If Analysis," and choose "Data Table".
Step 5: In the "Column Input cells" box, select the input cell reference.
Step 6: Click "OK" to generate the data table.
Can we use data tables for multiple formulas at once?
Yes, we can evaluate multiple formulas simultaneously using a "multi-formula" data table. Enter additional formulas to the right of the original formula for a vertical data or below it for a horizontal data table. All formuals should refer to the same input cell for accurate results.
Data table can work with other Excel features?
Data table work harmoniously with various Excel functions and features. we can use them alongside other tools like charts, graphs, and Pivot tables to enhance our data analysis capabilities and gain deeper insights.