Содержание
- How to make and use a data table in Excel
- What is a data table in Excel?
- How to create a one variable data table in Excel
- Row-oriented data table
- How to make a two variable data table in Excel
- Data table to compare multiple results
- Data table in Excel — 3 things you should know
- How to delete a data table in Excel
- How to edit data table results
- How to recalculate data table manually
- Apply data validation to cells
- Try it!
- Download our examples
- Restrict data entry
- Prompt users for valid entries
- Display an error message when invalid data is entered
- Add data validation to a cell or a range
How to make and use a data table in Excel
by Svetlana Cheusheva, updated on March 16, 2023
The tutorial shows how to use data tables for What-If analysis in Excel. Learn how to create a one-variable and two-variable table to see the effects of one or two input values on your formula, and how to set up a data table to evaluate multiple formulas at once.
You have built a complex formula dependent on multiple variables and want to know how changing those inputs changes the results. Instead of testing each variable individually, make a What-if analysis data table and observe all possible outcomes with a quick glance!
What is a data table in Excel?
In Microsoft Excel, a data table is one of the What-If Analysis tools that allows you to try out different input values for formulas and see how changes in those values affect the formulas output.
Data tables are especially useful when a formula depends on several values, and you’d like to experiment with different combinations of inputs and compare the results.
Currently, there exist one variable data table and two variable data table. Although limited to a maximum of two different input cells, a data table enables you to test as many variable values as you want.
Note. A data table isn’t the same thing as an Excel table, which is purposed for managing a group of related data. If you are looking to learn about many possible ways to create, clear and format a regular Excel table, not data table, please check out this tutorial: How to make and use a table in Excel.
How to create a one variable data table in Excel
One variable data table in Excel allows testing a series of values for a single input cell and shows how those values influence the result of a related formula.
To help you better understand this feature, we are going to follow a specific example rather than describing generic steps.
Suppose you are considering depositing your savings in a bank, which pays 5% interest that compounds monthly. To check different options, you’ve built the following compound interest calculator where:
- B8 contains the FV formula that calculates the closing balance.
- B2 is the variable you want to test (initial investment).
And now, let’s do a simple What-If analysis to see what your savings will be in 5 years depending on the amount of your initial investment, ranging from $1,000 to $6,000.
Here are the steps to make a one-variable data table:
- Enter the variable values either in one column or across one row. In this example, we are going to create a column-oriented data table, so we type our variable values in a column (D3:D8) and leave at least one blank column to the right for the outcomes.
- Type your formula in the cell one row above and one cell to the right of the variable values (E2 in our case). Or, link this cell to the formula in your original dataset (if you decide to change the formula in the future, you would need to update only one cell). We choose the latter option, and enter this simple formula in E2: =B8
Tip. If you want to examine the impact of the variable values on other formulas that refer to the same input cell, enter the additional formula(s) to the right of the first formula, as shown in this example.
Now, you can take a quick look at your one-variable data table, examine the possible balances and choose the optimal deposit size:
Row-oriented data table
The above example shows how to set up a vertical, or column-oriented, data table in Excel. If you prefer a horizontal layout, here’s what you need to do:
- Type the variable values in a row, leaving at least one empty column to the left (for the formula) and one empty row below (for the results). For this example, we enter the variable values in cells F3:J3.
- Enter the formula in the cell that is one column to the left of your first variable value and one cell below (E4 in our case).
- Make a data table as discussed above, but enter the input value (B3) in the Row input cell box:
- Click OK, and you will have the following result:
How to make a two variable data table in Excel
A two-variable data table shows how various combinations of 2 sets of variable values affect the formula result. In other words, it shows how changing two input values of the same formula changes the output.
The steps to create a two-variable data table in Excel are basically the same as in the above example, except that you enter two ranges of possible input values, one in a row and another in a column.
To see how it works, let’s use the same compound interest calculator and examine the effects of the size of the initial investment and the number of years on the balance. To have it done, set up your data table in this way:
- Enter your formula in a blank cell or link that cell to your original formula. Make sure you have enough empty columns to the right and empty rows below to accommodate your variable values. As before, we link the cell E2 to the original FV formula that calculates the balance: =B8
- Type one set of input values below the formula, in the same column (investment values in E3:E8).
- Enter the other set of variable values to the right of the formula, in the same row (number of years in F2:H2).
At this point, your two variable data table should look similar to this:
Data table to compare multiple results
If you wish to evaluate more than one formula at the same time, build your data table as shown in the previous examples, and enter the additional formula(s):
- To the right of the first formula in case of a vertical data table organized in columns
- Below the first formula in case of a horizontal data table organized in rows
For the «multi-formula» data table to work correctly, all the formulas should refer to the same input cell.
As an example, let’s add one more formula to our one-variable data table to calculate the interest and see how it is affected by the size of the initial investment. Here’s what we do:
- In cell B10, compute the interest with this formula: =B8-B3
- Arrange the data table’s source data like we did earlier: variable values in D3:D8 and E2 linked to B8 (Balance formula).
- Add one more column to the data table range (column F), and link F2 to B10 (interest formula):
- Select the extended data table range (D2:F8).
- Open the Data Table dialog box by clicking Data tab >What-If Analysis>Data Table…
- In the Column Input cell box, supply the input cell (B3), and click OK.
VoilГ , you can now observe the effects of your variable values on both formulas:
Data table in Excel — 3 things you should know
To effectively use data tables in Excel, please keep in mind these 3 simple facts:
- For a data table to be created successfully, the input cell(s) must be on the same sheet as the data table.
- Microsoft Excel uses the TABLE(row_input_cell, colum_input_cell) function to calculate data table results:
- In one-variable data table, one of the arguments is omitted, depending on the layout (column-oriented or row-oriented). For example, in our horizontal one-variable data table, the formula is =TABLE(, B3) where B3 is the column input cell.
- In two-variable data table, both arguments are in place. For example, =TABLE(B6, B3) where B6 is the row input cell and B3 is the column input cell.
The TABLE function is entered as an array formula. To make sure of this, select any cell with the calculated value, look at the formula bar, and note the around the formula. However, it is not a normal array formula — you can’t type it in the formula bar nor can you edit an existing one. It is just «for show».
How to delete a data table in Excel
As mentioned above, Excel does not allow deleting values in individual cells containing the results. Whenever you try to do this, an error message «Cannot change part of a data table» will show up.
However, you can easily clear the entire array of the resulting values. Here’s how:
- Depending on your needs, select all the data table cells or only the cells with the results.
- Press the Delete key.
How to edit data table results
Since it is not possible to change part of an array in Excel, you cannot edit individual cells with calculated values. You can only replace all those values with your own one by performing these steps:
- Select all the resulting cells.
- Delete the TABLE formula in the formula bar.
- Type the desired value, and press Ctrl + Enter .
This will insert the same value in all the selected cells:
Once the TABLE formula is gone, the former data table becomes a usual range, and you are free to edit any individual cell normally.
How to recalculate data table manually
If a large data table with multiple variable values and formulas slows down your Excel, you can disable automatic recalculations in that and all other data tables.
For this, go to the Formulas tab > Calculation group, click the Calculation Options button, and then click Automatic Except Data Tables.
This will turn off automatic data table calculations and speed up recalculations of the entire workbook.
To manually recalculate your data table, select its resulting cells, i.e. the cells with TABLE() formulas, and press F9 .
This is how you create and use a data table in Excel. To have a closer look at the examples discussed this this tutorial, you are welcome to download our sample Excel Data Tables workbook. I thank you for reading and would be happy to see you again next week!
Источник
Apply data validation to cells
Use data validation to restrict the type of data or the values that users enter into a cell. One of the most common data validation uses is to create a drop-down list.
Try it!
Select the cell(s) you want to create a rule for.
Select Data >Data Validation.
On the Settings tab, under Allow, select an option:
Whole Number — to restrict the cell to accept only whole numbers.
Decimal — to restrict the cell to accept only decimal numbers.
List — to pick data from the drop-down list.
Date — to restrict the cell to accept only date.
Time — to restrict the cell to accept only time.
Text Length — to restrict the length of the text.
Custom – for custom formula.
Under Data, select a condition.
Set the other required values based on what you chose for Allow and Data.
Select the Input Message tab and customize a message users will see when entering data.
Select the Show input message when cell is selected checkbox to display the message when the user selects or hovers over the selected cell(s).
Select the Error Alert tab to customize the error message and to choose a Style.
Now, if the user tries to enter a value that is not valid, an Error Alert appears with your customized message.
Download our examples
If you’re creating a sheet that requires users to enter data, you might want to restrict entry to a certain range of dates or numbers, or make sure that only positive whole numbers are entered. Excel can restrict data entry to certain cells by using data validation, prompt users to enter valid data when a cell is selected, and display an error message when a user enters invalid data.
Restrict data entry
Select the cells where you want to restrict data entry.
On the Data tab, click Data Validation > Data Validation.
Note: If the validation command is unavailable, the sheet might be protected or the workbook might be shared. You cannot change data validation settings if your workbook is shared or your sheet is protected. For more information about workbook protection, see Protect a workbook.
In the Allow box, select the type of data you want to allow, and fill in the limiting criteria and values.
Note: The boxes where you enter limiting values will be labeled based on the data and limiting criteria that you have chosen. For example, if you choose Date as your data type, you will be able to enter limiting values in minimum and maximum value boxes labeled Start Date and End Date.
Prompt users for valid entries
When users click in a cell that has data entry requirements, you can display a message that explains what data is valid.
Select the cells where you want to prompt users for valid data entries.
On the Data tab, click Data Validation > Data Validation.
Note: If the validation command is unavailable, the sheet might be protected or the workbook might be shared. You cannot change data validation settings if your workbook is shared or your sheet is protected. For more information about workbook protection, see Protect a workbook.
On the Input Message tab, select the Show input message when cell is selected check box.
In the Title box, type a title for your message.
In the Input message box, type the message that you want to display.
Display an error message when invalid data is entered
If you have data restrictions in place and a user enters invalid data into a cell, you can display a message that explains the error.
Select the cells where you want to display your error message.
On the Data tab, click Data Validation > Data Validation.
Note: If the validation command is unavailable, the sheet might be protected or the workbook might be shared. You cannot change data validation settings if your workbook is shared or your sheet is protected. For more information about workbook protection, see Protect a workbook.
On the Error Alert tab, in the Title box, type a title for your message.
In the Error message box, type the message that you want to display if invalid data is entered.
Do one of the following:
On the Style pop-up menu, select
Require users to fix the error before proceeding
Warn users that data is invalid, and require them to select Yes or No to indicate if they want to continue
Warn users that data is invalid, but allow them to proceed after dismissing the warning message
Add data validation to a cell or a range
Note: The first two steps in this section are for adding any type of data validation. Steps 3-7 are specifically for creating a drop-down list.
Select one or more cells to validate.
On the Data tab, in the Data Tools group, click Data Validation.
On the Settings tab, in the Allow box, select List.
In the Source box, type your list values, separated by commas. For example, type Low,Average,High.
Make sure that the In-cell dropdown check box is selected. Otherwise, you won’t be able to see the drop-down arrow next to the cell.
To specify how you want to handle blank (null) values, select or clear the Ignore blank check box.
Test the data validation to make sure that it is working correctly. Try entering both valid and invalid data in the cells to make sure that your settings are working as you intended and your messages are appearing when you expect.
After you create your drop-down list, make sure it works the way you want. For example, you might want to check to see if the cell is wide enough to show all your entries.
Remove data validation — Select the cell or cells that contain the validation you want to delete, then go to Data > Data Validation and in the data validation dialog press the Clear All button, then click OK.
The following table lists other types of data validation and shows you ways to add it to your worksheets.
Follow these steps:
Restrict data entry to whole numbers within limits.
Follow steps 1-2 above.
From the Allow list, select Whole number.
In the Data box, select the type of restriction that you want. For example, to set upper and lower limits, select between.
Enter the minimum, maximum, or specific value to allow.
You can also enter a formula that returns a number value.
For example, say you’re validating data in cell F1. To set a minimum limit of deductions to two times the number of children in that cell, select greater than or equal to in the Data box and enter the formula, =2*F1, in the Minimum box.
Restrict data entry to a decimal number within limits.
Follow steps 1-2 above.
In the Allow box, select Decimal.
In the Data box, select the type of restriction that you want. For example, to set upper and lower limits, select between.
Enter the minimum, maximum, or specific value to allow.
You can also enter a formula that returns a number value. For example, to set a maximum limit for commissions and bonuses of 6% of a salesperson’s salary in cell E1, select less than or equal to in the Data box and enter the formula, =E1*6%, in the Maximum box.
Note: To let a user enter percentages, for example 20%, select Decimal in the Allow box, select the type of restriction that you want in the Data box, enter the minimum, maximum, or specific value as a decimal, for example .2, and then display the data validation cell as a percentage by selecting the cell and clicking Percent Style in the Number group on the Home tab.
Restrict data entry to a date within range of dates.
Follow steps 1-2 above.
In the Allow box, select Date.
In the Data box, select the type of restriction that you want. For example, to allow dates after a certain day, select greater than.
Enter the start, end, or specific date to allow.
You can also enter a formula that returns a date. For example, to set a time frame between today’s date and 3 days from today’s date, select between in the Data box, enter =TODAY() in the Start date box, and enter =TODAY()+3 in the End date box.
Restrict data entry to a time within a time frame.
Follow steps 1-2 above.
In the Allow box, select Time.
In the Data box, select the type of restriction that you want. For example, to allow times before a certain time of day, select less than.
Enter the start, end, or specific time to allow. If you want to enter specific times, use the hh:mm time format.
For example, say you have cell E2 set up with a start time (8:00 AM), and cell F2 with an end time (5:00 PM), and you want to limit meeting times between those times then select between in the Data box, enter =E2 in the Start time box, and then enter =F2 in the End time box.
Restrict data entry to text of a specified length.
Follow steps 1-2 above.
In the Allow box, select Text Length.
In the Data box, select the type of restriction that you want. For example, to allow up to a certain number of characters, select less than or equal to.
In this case we want to limit entry to 25 characters, so select less than or equal to in the Data box and enter 25 in the Maximum box.
Calculate what is allowed based on the content of another cell.
Follow steps 1-2 above.
In the Allow box, select the type of data that you want.
In the Data box, select the type of restriction that you want.
In the box or boxes below the Data box, click the cell that you want to use to specify what is allowed.
For example, to allow entries for an account only if the result won’t go over the budget in cell E1, select Allow > Whole number, Data, less than or equal to, and Maximum >= =E1.
The following examples use the Custom option where you write formulas to set your conditions. You don’t need to worry about whatever the Data box shows, as that’s disabled with the Custom option.
The screen shots in this article were taken in Excel 2016; but the functionality is the same in Excel for the web.
To make sure that
Enter this formula
The cell that contains a product ID (C2) always begins with the standard prefix of «ID-» and is at least 10 (greater than 9) characters long.
The cell that contains a product name (D2) only contains text.
The cell that contains someone’s birthday (B6) has to be greater than the number of years set in cell B4.
Note: You must enter the data validation formula for cell A2 first, then copy A2 to A3:A10 so that the second argument to the COUNTIF will match the current cell. That is the A2)=1 portion will change to A3)=1, A4)=1 and so on.
For more information
Ensure that an e-mail address entry in cell B4 contains the @ symbol.
Tip: If you’re a small business owner looking for more information on how to get Microsoft 365 set up, visit Small business help & learning.
Источник
Controlling Data Input in Excel
- Select the cells (or the whole column) that should only accept input of exactly 10 characters.
- Go to the Data tab on the ribbon and choose Data Validation.
- At Allow, choose Text Length.
- At Data choose Equal To.
- Enter 10 in the Length field.
What are the control functions in Excel?
Microsoft Excel keyboard shortcuts
- Ctrl + N: To create a new workbook.
- Ctrl + O: To open a saved workbook.
- Ctrl + S: To save a workbook.
- Ctrl + A: To select all the contents in a workbook.
- Ctrl + B: To turn highlighted cells bold.
- Ctrl + C: To copy cells that are highlighted.
How do you use control in Excel?
- On the Developer tab, click Insert in the Controls group.
- In the Form Controls group, click the label icon, and then click on the worksheet where you want to place the control.
- Right-click the control and choose Edit Text.
- Delete the default text, and then type the text you want to use.
What are 5 main functions used in Excel?
To help you get started, here are 5 important Excel functions you should learn today.
- The SUM Function. The sum function is the most used function when it comes to computing data on Excel.
- The TEXT Function.
- The VLOOKUP Function.
- The AVERAGE Function.
- The CONCATENATE Function.
How do I restrict input in Excel?
Restrict data entry
- Select the cells where you want to restrict data entry.
- On the Data tab, click Data Validation > Data Validation.
- In the Allow box, select the type of data you want to allow, and fill in the limiting criteria and values.
How do you make a cell input?
- Position the insertion point where you want to create the cell.
- On the Home tab, click Cell.
- Enter a unique cell number and click OK.
- In the Cell Type list, select the type of cell you want to create.
- Under Calculation Properties, select the Input Cell option.
- Enter the applicable cell properties.
- Click OK.
What is Ctrl N?
☆☛✅Ctrl+N is a shortcut key often used to create a new document, window, workbook, or another type of file. Also referred to as Control N and C-n, Ctrl+N is a shortcut key most often used to create a new document, window, workbook, or another type of file.
What is Ctrl M?
Alternatively referred to as Control+M and C-m, Ctrl+M is a keyboard shortcut whose function varies depending on the program where it’s being utilized. For example, in Microsoft Word, Ctrl+M indents a paragraph of text. How to use the Ctrl+M keyboard shortcut. Ctrl+M in an Internet browser.
What are the 5 uses of spreadsheet?
Once this data is entered into the spreadsheet, you can use it to help organize and grow your business.
- Business Data Storage.
- Accounting and Calculation Uses.
- Budgeting and Spending Help.
- Assisting with Data Exports.
- Data Sifting and Cleanup.
- Generating Reports and Charts.
- Business Administrative Tasks.
What are the basic Excel formulas?
Seven Basic Excel Formulas For Your Workflow
- =SUM(number1, [number2], …)
- =SUM(A2:A8) – A simple selection that sums the values of a column.
- =SUM(A2:A8)/20 – Shows you can also turn your function into a formula.
- =AVERAGE(number1, [number2], …)
- =AVERAGE(B2:B11) – Shows a simple average, also similar to (SUM(B2:B11)/10)
How do I create a dynamic data validation list in Excel?
Add the Main Drop Down
- On the DataEntry sheet, select cell B3.
- On the Ribbon, click the Data tab, then click Data Validation.
- From the Allow drop-down list, choose List.
- In the Source box, type an equal sign and the list name: =Produce.
- Click OK, to complete the data validation setup.
What is F $6 in Excel?
absolute cell references
As with absolute cell references, the dollar sign ( $ ) is used in mixed cell references to indicate that a column letter or row number is to remain fixed when a copied from one cell to another. For F$6, the row number is fixed while the column letter changes.
Use data validation to restrict the type of data or the values that users enter into a cell, like a dropdown list.
Try it!
-
Select the cell(s) you want to create a rule for.
-
Select Data >Data Validation.
-
On the Settings tab, under Allow, select an option:
-
Whole Number — to restrict the cell to accept only whole numbers.
-
Decimal — to restrict the cell to accept only decimal numbers.
-
List — to pick data from the drop-down list.
-
Date — to restrict the cell to accept only date.
-
Time — to restrict the cell to accept only time.
-
Text Length — to restrict the length of the text.
-
Custom – for custom formula.
-
-
Under Data, select a condition.
-
Set the other required values based on what you chose for Allow and Data.
-
Select the Input Message tab and customize a message users will see when entering data.
-
Select the Show input message when cell is selected checkbox to display the message when the user selects or hovers over the selected cell(s).
-
Select the Error Alert tab to customize the error message and to choose a Style.
-
Select OK.
Now, if the user tries to enter a value that is not valid, an Error Alert appears with your customized message.
Download our examples
Download an example workbook with all data validation examples in this article
If you’re creating a sheet that requires users to enter data, you might want to restrict entry to a certain range of dates or numbers, or make sure that only positive whole numbers are entered. Excel can restrict data entry to certain cells by using data validation, prompt users to enter valid data when a cell is selected, and display an error message when a user enters invalid data.
Restrict data entry
-
Select the cells where you want to restrict data entry.
-
On the Data tab, click Data Validation > Data Validation.
Note: If the validation command is unavailable, the sheet might be protected or the workbook might be shared. You cannot change data validation settings if your workbook is shared or your sheet is protected. For more information about workbook protection, see Protect a workbook.
-
In the Allow box, select the type of data you want to allow, and fill in the limiting criteria and values.
Note: The boxes where you enter limiting values will be labeled based on the data and limiting criteria that you have chosen. For example, if you choose Date as your data type, you will be able to enter limiting values in minimum and maximum value boxes labeled Start Date and End Date.
Prompt users for valid entries
When users click in a cell that has data entry requirements, you can display a message that explains what data is valid.
-
Select the cells where you want to prompt users for valid data entries.
-
On the Data tab, click Data Validation > Data Validation.
Note: If the validation command is unavailable, the sheet might be protected or the workbook might be shared. You cannot change data validation settings if your workbook is shared or your sheet is protected. For more information about workbook protection, see Protect a workbook.
-
On the Input Message tab, select the Show input message when cell is selected check box.
-
In the Title box, type a title for your message.
-
In the Input message box, type the message that you want to display.
Display an error message when invalid data is entered
If you have data restrictions in place and a user enters invalid data into a cell, you can display a message that explains the error.
-
Select the cells where you want to display your error message.
-
On the Data tab, click Data Validation > Data Validation.
Note: If the validation command is unavailable, the sheet might be protected or the workbook might be shared. You cannot change data validation settings if your workbook is shared or your sheet is protected. For more information about workbook protection, see Protect a workbook.
-
On the Error Alert tab, in the Title box, type a title for your message.
-
In the Error message box, type the message that you want to display if invalid data is entered.
-
Do one of the following:
To
On the
Style
pop-up menu, selectRequire users to fix the error before proceeding
Stop
Warn users that data is invalid, and require them to select Yes or No to indicate if they want to continue
Warning
Warn users that data is invalid, but allow them to proceed after dismissing the warning message
Important
Add data validation to a cell or a range
Note: The first two steps in this section are for adding any type of data validation. Steps 3-7 are specifically for creating a drop-down list.
-
Select one or more cells to validate.
-
On the Data tab, in the Data Tools group, click Data Validation.
-
On the Settings tab, in the Allow box, select List.
-
In the Source box, type your list values, separated by commas. For example, type Low,Average,High.
-
Make sure that the In-cell dropdown check box is selected. Otherwise, you won’t be able to see the drop-down arrow next to the cell.
-
To specify how you want to handle blank (null) values, select or clear the Ignore blank check box.
-
Test the data validation to make sure that it is working correctly. Try entering both valid and invalid data in the cells to make sure that your settings are working as you intended and your messages are appearing when you expect.
Notes:
-
After you create your drop-down list, make sure it works the way you want. For example, you might want to check to see if the cell is wide enough to show all your entries.
-
Remove data validation — Select the cell or cells that contain the validation you want to delete, then go to Data > Data Validation and in the data validation dialog press the Clear All button, then click OK.
The following table lists other types of data validation and shows you ways to add it to your worksheets.
To do this: |
Follow these steps: |
---|---|
Restrict data entry to whole numbers within limits. |
|
Restrict data entry to a decimal number within limits. |
|
Restrict data entry to a date within range of dates. |
|
Restrict data entry to a time within a time frame. |
|
Restrict data entry to text of a specified length. |
|
Calculate what is allowed based on the content of another cell. |
|
Notes:
-
The following examples use the Custom option where you write formulas to set your conditions. You don’t need to worry about whatever the Data box shows, as that’s disabled with the Custom option.
-
The screen shots in this article were taken in Excel 2016; but the functionality is the same in Excel for the web.
To make sure that |
Enter this formula |
---|---|
The cell that contains a product ID (C2) always begins with the standard prefix of «ID-» and is at least 10 (greater than 9) characters long. |
=AND(LEFT(C2,3)=»ID-«,LEN(C2)>9)
|
The cell that contains a product name (D2) only contains text. |
=ISTEXT(D2)
|
The cell that contains someone’s birthday (B6) has to be greater than the number of years set in cell B4. |
=IF(B6<=(TODAY()-(365*B4)),TRUE,FALSE)
|
All the data in the cell range A2:A10 contains unique values. |
=COUNTIF($A$2:$A$10,A2)=1
Note: You must enter the data validation formula for cell A2 first, then copy A2 to A3:A10 so that the second argument to the COUNTIF will match the current cell. That is the A2)=1 portion will change to A3)=1, A4)=1 and so on. For more information |
Ensure that an e-mail address entry in cell B4 contains the @ symbol. |
=ISNUMBER(FIND(«@»,B4))
|
Tip: If you’re a small business owner looking for more information on how to get Microsoft 365 set up, visit Small business help & learning.
Want more?
Create a drop-down list
Add or remove items from a drop-down list
More on data validation
Data entry can sometimes be a big part of using Excel.
With near endless cells, it can be hard for the person inputting data to know where to put what data.
A data entry form can solve this problem and help guide the user to input the correct data in the correct place.
Excel has had VBA user forms for a long time, but they are complicated to set up and not very flexible to change.
In this blog post, we’re going to explore 5 easy ways to create a data entry form for Excel.
Video Tutorial
Excel Tables
We’ve had Excel tables since Excel 2007.
They’re perfect data containers and can be used as a simple data entry form.
Creating a table is easy.
- Select the range of data including the column headings.
- Go to the Insert tab in the ribbon.
- Press the Table button in the Tables section.
We can also use a keyboard shortcut to create a table. The Ctrl + T keyboard shortcut will do the same thing.
Make sure the Create Table dialog box has the My table has headers option checked and press the OK button.
We now have our data inside an Excel table and we can use this to enter new data.
To add new data into our table we can start typing a new entry into the cells directly below the table and the table will absorb the new data.
We can use the Tab key instead of Enter while entering our data. This will cause the active cell cursor to move to the right instead of down so we can add the next value into our record.
When the active cell cursor is in the last cell of the table (lower right cell), pressing the Tab key will create a new empty row in the table ready for the next entry.
This is a perfect and simple data entry form.
Data Entry Form
Excel actually has a hidden data entry form and we can access it by adding the command to the Quick Access Toolbar.
Add the form command to the Quick Access Toolbar.
- Right click anywhere on the quick quick access toolbar.
- Select Customize Quick Access Toolbar from the menu options.
This will open up the Excel option menu on the Quick Access Toolbar tab.
- Select Commands Not in the Ribbon.
- Select Form from the list of available commands. Press F to jump to the commands starting with F.
- Press the Add button to add the command into the quick access toolbar.
- Press the OK button.
We can then open up data entry form for any set of data.
- Select a cell inside the data which we want to create a data entry form with.
- Click on the Form icon in the quick access toolbar area.
This will open up a customized data entry form based on the fields in our data.
Microsoft Forms
If we need a simple data entry form, why not use Microsoft Forms?
This form option will require our Excel workbook to be saved into SharePoint or OneDrive.
The form will be in a browser and not in Excel, but we can link the form to an Excel workbook so that all the data goes into our Excel table.
This is a great option if multiple people or people outside our organization need to input data into the Excel workbook.
We need to create a Form for Excel in either SharePoint or OneDrive. The process is the same for both SharePoint or OneDrive.
- Go to a SharePoint document library or a OneDrive folder where the Excel workbook is going to be saved.
- Click on New and then choose Forms for Excel.
This will prompt us to name the Excel workbook and open up a new browser tab where we can build our form by adding different types of questions.
We first need to create the Form and this will create the table in our Excel workbook where the data will get populated.
Then we can share the form with anyone we want to input data into Excel.
When a user enters data into the form and presses the submit button, that data will automatically show up into our Excel workbook.
Power Apps
Power Apps is a flexible drag and drop formula based app building platform from Microsoft.
We can certainly use it to create a data entry from for our Excel data.
In fact, if we have a table of data set up, Power Apps will create the app for us based on our data. It can’t be any easier than that.
Sign in to the powerapps.microsoft.com service ➜ go to the Create tab in the navigation pane ➜ select Excel Online.
We’ll then be prompted to sign in to our SharePoint or OneDrive account where our Excel file is saved to select the Excel workbook and table with our data.
This will generate us a fully functional three screen data entry app.
- We can search and view all the records in our Excel table in a scroll-able gallery.
- We can view an individual record in our data.
- We can edit an existing record or add new records.
This is all connected to our Excel table, so any changes or additions from the app will show up in Excel.
Power Automate
Power Automate is a cloud based tool for automating task between apps.
But we can use the button trigger to make an automation that captures user input and adds the data into an Excel table.
We’ll need to have our Excel workbook saved in OneDrive or SharePoint and have a table already setup with the fields we want to populate.
To create our Power Automate data entry form.
- Go to flow.microsoft.com and sign in.
- Go to the Create tab.
- Create an Instant flow.
- Give the flow a name.
- Choose the Manually trigger a flow option as the trigger.
- Press the Create button.
This will open up the Power Automate builder and we can build our automation.
- Click on the Manually trigger a flow block to expand the trigger’s options. This is where we’ll find the ability to add input fields.
- Click on the Add an input button. This will give us options to add a few different types of input fields including Text, Yes/No, Files, Email, Number and Dates.
- Rename the field to something descriptive. This will help the user know what type of data to input when they run this automation.
- Click on the three ellipses to the right of each field to change the input options. We’ll be able to Add a drop-down list of option, Add a multi-select list of options, Make the field optional or Delete the field from this menu.
- After we have added all our input fields, we can now add a New step to the automation.
Search for the Excel connector and add the Add a row into a table action. If you’re on an Office 365 business account, use the Excel Online (Business) connectors, otherwise use the Excel Online (OneDrive) connectors.
Now we can set up our Excel Add a row into a table step.
- Navigate to the Excel file and table where we are going to be adding data.
- After selecting the table, the fields in that table will appear listed and we can add the appropriate dynamic content from the Manually trigger a flow trigger step.
Now we can run our Flow from the Power Automate service.
- Go to My flows in the left navigation pane.
- Go to the My flows tab.
- Find the flow in the list of available flows and click on the Run button.
- A side pane will pop up with our inputs and we can enter our data.
- Click Run flow.
We can also run this from our mobile device with the Power Automate apps.
- Go to the Buttons section in the app.
- Press on the flow to run.
- Enter the data inputs in the form.
- Press on the DONE button in the top right.
Whichever way we run the flow, a few seconds later the data will appear in our Excel table.
Conclusions
Whether we require a simple form or something more complex and customize-able, there is a solution for our data entry needs.
We can quickly create something inside our workbook or use an external solution that connects to and loads data into Excel.
We can even create forms that people outside our organization can use to populate our spreadsheets.
Let me know in the comments what is your favourite data entry form option.
About the Author
John is a Microsoft MVP and qualified actuary with over 15 years of experience. He has worked in a variety of industries, including insurance, ad tech, and most recently Power Platform consulting. He is a keen problem solver and has a passion for using technology to make businesses more efficient.
Input Message in Excel can be used to show a message when a cell is selected. It is particularly useful if you want to show some instructions to the user when he/she selects a cell. Examples could be to display form filling instructions or data entry instructions.
Can’t this also be done using comments in cells?? – Well Yes!
Yes, you can use cell comments as well. The only drawback with comments is that it is displayed only when you hover the mouse over the cell.
On the other hand, you can use Input Message in Excel to display a message whenever a cell is selected (using either mouse or keyboard).
Something as shown below:
How to Use Input Message in Excel
- Select any cell and then go to Data tab –> Data Validation.
- In Data Validation dialogue box, select Input Message tab.
- Ensure that “Show input message when cell is selected” check box is selected.
- In the Input message tab, enter Title (max 32 characters, optional) and Input Message (max 256 characters).
- Click OK.
Now whenever you either click on the cell or select it using the keyboard, it would display the message.
Caution: If you move the message box from its position, then all the message box will be shown at that position only. So it is safe not to move the message box.
You May Also Like the Following Excel Tips:
- How to create a drop-down list in Excel.
- 10 Excel Data Entry Tips You Can’t Afford to Miss.
- How to track changes in Excel.
- How to Enable Conditional Data Entry in Excel using Data Validation.
- Creating and Using Excel Data Entry Forms.
What is Data Table in Excel?
A Data Table in Excel helps study the different outputs obtained by changing one or two inputs of a formula. A data table does not allow changing more than two inputs of a formula. However, these two inputs can have as many possible values (to be experimented) as one wants. Excel Data tables, along with Scenarios and Goal Seek are parts of the What-If Analysis tools.
For example, an organization may want to study how changes in the cash possessed impact its working capital. A data table will help the organization know the optimum level of cash (from the specified possible values) to be held to meet its short-term obligations.
The purpose of creating data tables in Excel is to analyze the variation in outputs resulting from a change in the inputs. Moreover, one can have all the outputs in a single table which eases interpretation and allows quick sharing with other users.
Table of contents
- What is Data Table in Excel?
- Types of Data Tables in Excel
- One-Variable Data Table in Excel
- Example #1
- Two-Variable Data Table in Excel
- Example #2
- The Key Points Governing Data Tables in Excel
- Frequently Asked Questions
- Recommended Articles
- One-Variable Data Table in Excel
Types of Data Tables in Excel
The kinds of data tables in Excel are specified as follows:
- One-variable data table
- Two-variable data table
Let us discuss each type of data table one by one with the help of examples.
Note: A data table is different from a regular Excel tableIn excel, tables are a range with data in rows and columns, and they expand when new data is inserted in the range in any new row or column in the table. To use a table, click on the table and select the data range.read more. The former shows the various combinations of inputs and outputs. These outputs are calculated by considering the source dataset as the base. In contrast, an Excel table shows related data that is grouped in one place.
One-Variable Data Table in Excel
A one-variable data tableOne variable data table in excel means changing one variable with multiple options and getting the results for multiple scenarios. The data inputs in one variable data table are either in a single column or across a row.read more is created to study how a change in one input of the formula causes a change in the output. A one-variable data table in excel can be either row-oriented or column-oriented. This implies that all the possible values that an input can assume are listed in either a single row (row-oriented) or a single column (column-oriented) of Excel.
You can download this DATA Table Excel Template here – DATA Table Excel Template
Example #1
There are two images titled “image 1” and “image 2.” The following information is given:
- Image 1 shows an organization’s revenue (in $) for 2018 in cell B2. The minimum growth rate expected is given as 12% in cell B3. The projected revenue (in $ in cell B5) for 2019 has been calculated by using the formula “=B2+(B2*B3).”
- Image 2 shows the possible values (in column C) that the growth rate can assume. The value of cell D8 has been explained in steps 1 and 2 (given further in this example).
We want to perform the following tasks:
- Calculate the projected revenues (in column D) according to the different growth rates (in column C) given in image 2.
- Create a “line with markers” chart showing the growth rates on the x-axis and the projected revenues on the y-axis. Replace the markers of the chart with arrows.
Use a one-variable data table of Excel. Interpret the data table thus created.
Image 1
Image 2
The steps for performing the given tasks by using a one-variable data table are listed as follows:
- Enter the data of the two images in Excel. In cell D8, type “equal to” (=) followed by the reference B5. This links cell D8 to cell B5.
The linking of the two cells is shown in the following image.
Since all the growth rates have been entered vertically (C9:C19), our data table is said to be column-oriented. The entire range C8:D19 is our one-variable data table. We are creating a one-variable data table as the change in outputs will be observed against a change in one input, i.e., the growth rate.
Note: Notice that either the formula “=B2+(B2*B3)” could be typed directly in cell D8 or cell D8 can be linked to cell B5. We have chosen to link the two cells.
The linking of cell D8 to cell B5 ensures that any updates in the formula of the latter are automatically reflected in the range D9:D19 of the data table. For instance, if the formula of cell B5 is multiplied by 2 [like =B2+(B2*B3)*2], all the outputs obtained in the range D9:D19 are automatically multiplied by 2.
Had we not linked cells D8 and B5, any changes to the formula of cell B5 would not have changed the value in cell D8. Consequently, the outputs in the range D9:D19 would not have been updated automatically.
- Press the “Enter” key. Cell D8 shows the value of cell B5, as shown in the following image.
Notice that if one manually enters the value (1680000) in cell D8, the data table will not work. Moreover, one should always type the formula [=B2+(B2*B3)] or link the cell that is one row above and one column to the right of the possible input values (C9:C19). This is the reason we chose to link cell D8 to cell B5.
Note: If the data table is row-oriented, type the formula or link the cell that is one column to the left and one cell below the first possible input value. For instance, had the possible input values been in the range F2:P2, we would have entered the formula or linked cell E3 to cell B5.
- Select the range of the data table. This selection should include the linked cell (D8), the possible input values (C9:C19), and the empty cells for outputs (D9:D19). Hence, we have selected the range C8:D19, as shown in the following image.
- From the Data tab, click the “what-if analysis” drop-down (in the “data tools” or “forecast” group). Select the option “data table.” This option is shown in the following image.
- The “data table” dialog box opens, as shown in the following image. In the box of “column input cell,” select cell B3, which contains the minimum expected growth rate. As a result, the reference $B$3 appears in this box. Leave the box of “row input cell” blank.
By giving the reference to cell B3 in the “column input cell,” we are telling Excel that at the growth rate of 12%, the projected revenue is $1,680,000. So, with this data table, Excel is being asked the projected revenue when the growth rates vary from 12.5% to 22.5%.
Note 1: A “row input cell” or “column input cell” is a reference to a cell that contains the input. This is the input that can assume the different possible values. Moreover, this input must necessarily be used in the formula whose outputs are to be studied.
In a one-variable data table, either the “row input cell” or the “column input cell” is specified depending on whether the data table is row-oriented or column-oriented.
Note 2: In a one-variable data table, Excel uses either the formula “=TABLE(row_input_cell,)” or “=TABLE(,column_input_cell)” to calculate the different outputs. The former formula is used when the possible input values are in a row, while the latter is used when the possible input values are in a column.
To view the TABLE formula, select any of the output cells and check the formula bar. In this example, the formula “=TABLE(,B3)” is used to calculate the outputs.
Further, Excel uses these TABLE formulas as array formulasArray formulas are extremely helpful and powerful formulas that are used in Excel to execute some of the most complex calculations. There are two types of array formulas: one that returns a single result and the other that returns multiple results.read more. However, these formulas cannot be edited manually, unlike the regular array formulas. But, one can delete all the output cells containing the TABLE formulas.
- Click “Ok” in the “data table” window. The range D9:D19 of the data table has been filled with values. The different outputs are shown in the following image.
Interpretation of the one-variable data table: By looking at the data table in the preceding image, one can say that when the growth rate is 12.5%, the projected revenue is $1,687,500. Likewise, when the growth rate is 13.5%, the projected revenue is $1,702,500. Hence, the larger the growth rate, the more the increase in the projected revenue.
The projected revenue is at its maximum ($1,837,500) when the growth rate is at its highest (22.5%). So, the organization can study the variation in outputs when a single input (growth rate) changes.
Note: For more examples related to the one-variable data table of Excel, refer to the hyperlink given before step 1.
- To create a “line with markers” chart that displays the growth rates on the x-axis and the projected revenues on the y-axis, follow the listed steps:
a. Select the range D9:D19 and click the Insert tab on the Excel ribbon.
b. Click the “insert line or area chart” icon from the “charts” group. Select the “line with markers” chart under the 2-D line charts. A “line with markers” chart appears, which displays the projected revenues on the y-axis.
c. Click anywhere on the chart. The “chart tools” menu becomes visible. This menu consists of the Design and Format tabs.
d. Click the Design tab of the “chart tools” menu. Choose “select data” from the “data” group. The “select data source” window opens.
e. Click “edit” under “horizontal (category) axis labels.” The “axis labels” window opens.
f. Select the range C9:C19 in the “axis label range” box. Click “Ok.” Click “Ok” again in the “select data source” window.The “line with markers” chart is created whose x-axis and y-axis look the way they are shown in the image of step 8.
- To replace the default markers of the chart with arrows, follow the listed steps:
a. Select the markers of the chart and right-click them. Choose the “format data series” option from the context menu. The “format data series” pane opens.
b. Click the “fill & line” tab. Expand the “line” tab. In “end arrow type,” select any of the arrows. We have chosen “open arrow.”
c. Select “marker” and expand the “marker options.” Choose the option “none.”
d. Close the “format data series” pane.The “line with markers” chart looks the way it is displayed in the following image. Notice that since the chart shows the projected revenues, we have titled it accordingly.
Two-Variable Data Table in Excel
A two-variable data table in excelA two-variable data table helps analyze how two different variables impact the overall data table. In simple terms, it helps determine what effect does changing the two variables have on the result.read more helps study how changes in two inputs of a formula cause a change in the output. In a two-variable data table, there are two ranges of possible values for the two inputs. From these two ranges, one range is in a row and the other is in a column of Excel.
Example #2
There are three images titled “image 1,” “image 2,” and “image 3.” The following information is given:
- Image 1 shows an organization’s revenue (in $ in 2018) and the minimum growth rate in cells B2 and B3 respectively. Both these figures are the same as that of the previous example. Additionally, the organization gives a 2% discount (in cell B4) to its customers. This is given to boost sales.
- Image 2 shows how the projected revenue (in $ in cell B6) for 2019 has been calculated. The formula “=B2+(B2*B3)-(B2*B4)” is used for this purpose. The amount obtained ($1,650,000) is the projected revenue after the discount.
- Image 3 shows the different values in row 9 that the discount rate can assume. The possible values that the growth rate can assume are given in column D. The value of cell D9 has been explained in steps 1 and 2 (given further in this example).
Calculate the projected revenues (in E10:J18) according to the various discount rates (in row 9) and growth rates (in column D). Use a two-variable data table of Excel. Interpret the data table thus created.
Image 1
Image 2
Image 3
The steps for creating a two-variable data table are listed as follows:
Step 1: Enter the data of the preceding images in Excel. In cell D9, type the “equal to” operator followed by the reference B6.
This time we have chosen to link cell D9 to cell B6. Alternatively, we could have also entered the formula [=B2+(B2*B3)-(B2*B4)] in cell D9. This is because, in a two-variable data table, one should type the formula or link the cell that is one column to the left of the first horizontal input value (2.5%). At the same time, this cell should be one row above the first vertical input value (12.5%).
The linking of cells ensures that any changes to the formula of cell B6 are reflected in the value of cell D9. Further, any change in the value of cell D9 will update the outputs (in E10:J18) automatically.
Note: Please ignore the differences in font, colors, and alignment across the images of this example. These differences may be due to the different versions of Excel being used to create the images.
Step 2: Press the “Enter” key. Cell D9 shows the value of cell B6, which is 1,650,000. This is shown in the following image.
The entire range D9:J18 is our two-variable data table. Notice that the excel data table shows the possible discount rates horizontally (in bold in row 9) and the possible growth rates vertically (in column D). This time the variation in outputs resulting from changes in both these inputs (discount rate and growth rate) need to be studied.
Note: If the value is entered manually in cell D9, the excel data table will not work.
Step 3: Select the range D9:J18. Note that the selection should include the linked cell (D9), possible discount rates (E9:J9), possible growth rates (D10:D18), and the empty cells for the outputs (E10:J18).
The selection is shown in the following image.
Step 4: Click the “what-if analysis” drop-down (in the “data tools” or “forecast” group) of the Data tab. Select the option “data table.”
Step 5: The “data table” window opens, as shown in the following image. In the box of “row input cell,” select cell B4. In the box of “column input cell,” select cell B3. The absolute referencesAbsolute reference in excel is a type of cell reference in which the cells being referred to do not change, as they did in relative reference. By pressing f4, we can create a formula for absolute referencing.read more to cells B4 and B3 appear in the two boxes.
Cells B4 and B3 contain the minimum expected growth rate and the discount rate of the source dataset.
By making these selections, Excel is told that at a discount rate of 2% and a growth rate of 12%, the projected revenue is $1,650,000. Therefore, our two-variable data table instructs Excel to calculate the projected revenues when the discount rates and growth rates vary from 2.5% to 5% and 12.5% to 20.5% respectively.
Note: In a two-variable data table, both the “row input cell” and “column input cell” are specified, unlike a one-variable data table where one has to specify either of the two inputs.
Further a two-variable data table uses the formula “=TABLE(row_input_cell,column_input_cell)” to calculate the outputs. So, in this example, the formula “=TABLE(B4,B3)” has been used for the calculations. This formula is visible in the formula bar when an output cell is selected.
For the meaning of the “row input cell” and the “column input cell,” refer to “note 1” under step 5 of example #1.
Step 6: Click “Ok” in the “data table” window. The outputs appear in the range E10:J18, as shown in the following image.
Interpretation of the two-variable data table: When the discount rate is 2.5% and the growth rate is 12.5%, the organization’s projected revenue is $1,650,000 (in cell E10). Notice that this figure is the same as that of cell B6. However, the value in cell B6 takes into account 2% and 12% as the discount rate and growth rate respectively.
Notice that the numbers of cells E10 and B6 match those of cells G11 and I12. This implies that when the discount rate and growth rate are increased in the same proportion (like by 0.5%, 1.5% or 2.5%), the resulting value is the same as the output of the source dataset (in cell B6). Cells E10, G11, and I12 reflect 0.5%, 1.5%, and 2.5% increase in the two rates.
Likewise, had we increased both the discount and growth rates by 1%, the resulting value would have again been $1,650,000. In this case, the discount rate and growth rate would have been 3% and 13% respectively.
By obtaining the projected revenues in the range E10:J18, the organization can sell at an optimum discount rate and, at the same time, target an attainable growth rate. Hence, the organization can choose the most suitable combination of the two rates.
Note: For more examples related to the two-variable data table of Excel, click the hyperlink given before step 1 of this example.
The Key Points Governing Data Tables in Excel
The important points related to data tables of Excel are listed as follows:
- It helps select those input values that fit the business in the best possible manner.
- It facilitates the comparison of the different outputs as all the results are consolidated in one place.
- It presents the results in a tabular format that can neither be edited nor undone with the shortcut “Ctrl+Z.” The outputs can only be deleted by selecting them and pressing the “Delete” key.
- It uses the TABLE array formulas to calculate the outputs. The “row input cell” and the “column input cell” must be selected carefully to get accurate results. Moreover, the input cell or cells must be on the same worksheet as the data table.
- It need not be refreshed, unlike a pivot table. A change in the values or the formula of the source dataset causes the excel data table to update automatically.
Frequently Asked Questions
1. Define a data table and suggest when it should be used in Excel.
A data table helps analyze how a change in one or two inputs of a formula causes a change in the output. The resulting outputs are arranged in a tabular format, making them easy to compare and interpret.
A data table of Excel should be used in the following situations:
• When the outputs resulting from a change in one or two inputs need to be studied
• When the most optimum input value or values need to be chosen
• When all the combinations of inputs and outputs need to be explored in one glance
2. How to create a data table in Excel?
The steps to create a data table in Excel are listed as follows:
a. Enter the source dataset in an Excel worksheet. Use one or two inputs to calculate an output.
b. Arrange the possible values, which an input can assume, in a row and/or column.
c. Link one cell of the data table to the output cell of the source dataset. Alternatively, in a cell of the data table, enter the formula whose outputs need to be studied.
d. Select the data table. The selection should include the linked cell (or the formula cell of the data table), the possible input values, and the empty cells for outputs.
e. Select the “data table” option from the “what-if analysis” drop-down of the Data tab. The “data table” window opens.
f. Enter either the “row input cell” or “column input cell” if the impact of changing one input is to be studied. To study the impact of changing two inputs, enter both “row input cell” and “column input cell.”
g. Click “Ok” in the “data table” window.
A one-variable or two-variable data table is created depending on the execution of steps “a,” “b,” and “f.”
Note: For more details on creating a data table in Excel, refer to the examples of this article.
3. How does a data table work in Excel?
A data table works on the policy “what will be the result if one or two inputs of a formula are changed?” One cell of the data table is linked to the source dataset. In this way, Excel is told how the inputs are to be used in calculating the output.
Next, as the possible input values are supplied, Excel is asked to calculate the outputs using the same formula as that of the source dataset. The resulting table shows the different mixes of inputs and outputs, thereby assisting the user in decision-making.
Recommended Articles
This has been a guide to Data Tables in Excel. Here we discuss how to create one-variable and two-variable data tables along with practical Excel examples. You may learn more about Excel from the following articles–
- Two-Variable Data Table in ExcelA two-variable data table helps analyze how two different variables impact the overall data table. In simple terms, it helps determine what effect does changing the two variables have on the result.read more
- VBA Refresh Pivot TableWhen we insert a pivot table in the sheet, once the data changes, pivot table data does not change itself; we need to do it manually. However, in VBA, there is a statement to refresh the pivot table, expression.refreshtable, by referencing the worksheet.read more
- Merge Tables ExcelWe can use a number of different methods to merge tables in Excel, including the VLOOKUP function, the INDEX function, and the MATCH function.read more
- Data Validation in ExcelThe data validation in excel helps control the kind of input entered by a user in the worksheet.read more