Using Data Validation to Limit Calculated Cell

This post explains that how to limit calculated cell using Data Validation in excel. You can use the Data Validation function to limit what a user can type in a cell. And you can also use the data validation to limit user to whole number, dates, a list of selections or a specific range of values.

For example, there is a cell D1 that has the formula =SUM(B1:B3), if the sum of B1:B3 is greater than 20, then you want excel to pop up a warning message dialog and stop entering value in the range B1:B3. How to do this? You can use the Data Validation to set the criteria to limit this calculated cell using the formula =SUM($B$1:$B$3)<=20 in the Data Validation dialog box.

Using Data Validation to Limit Calculated Cell


To Use Data Validation to limit Data Entry in calculated cell, you can follow these steps:

#1 select the calculated cells that you want to limit.

#2 go to DATA tab, click Data Validation command under Data Tools group, then select Data Validation… menu from the drop down menu list. The Data Validation dialog will appear.

data validation to limit cell1

#3 select Custom from the drop-down list box of Allow, then type the formula =SUM($B$1:$B$3)<=20 into the Formula text box. Click OK.

data validation to limit cell2

#4 switch to Error Alert tab in the Data Validation dialog box, select stop style from the drop-down list of style. Then you can enter the error warning message in the text box of Error message. Click OK.

data validation to limit cell3

#5 if the sum of the range B1:B3 is greater than 20, the warning dialog will pop-up.

data validation to limit cell4

Related Functions


  • Excel SUM function
    The Excel SUM function will adds all numbers in a range of cells and returns the sum of these values. You can add individual values, cell references or ranges in excel.The syntax of the SUM function is as below:= SUM(number1,[number2],…)…
Related Posts
If Cell Begins with One of Three Supplied Characters
If Cell Begins with One of Three Supplied Characters

If you want to test values to see if they begin with some given specific characters like “x”, ”y”, or “z”, you can create a formula with COUNTIF and SUM functions to return results. EXAMPLE You can see “TRUE” or ...

Average per Week by Formula in Excel
Average per Week 1

We usually apply AVERAGE function or relevant functions to return average directly in Excel worksheet. But in some situations, only applying average relevant functions cannot figure out our problem. Sometimes we can create a formula with functions and mathematical operation ...

How to Sum if Contains an Asterisk
How to Sum if Contains an Asterisk 7

To add numbers together we need to apply SUM function. And if we want to add numbers based on some conditions, we can add criteria with the help of SUMIFS function, SUMIFS can filter data with multiple criteria effectively. If ...

How to Sum in Vertical Range
How to Sum in Vertical Range 8

If we want to add numbers based on some conditions in Excel worksheet, we can add criteria with the help of SUMIFS function, SUMIFS can filter data with multiple criteria effectively. In this article, we will introduce you the method ...

How to Sum in Horizontal Range
How to Sum in Horizontal Range9

To add numbers together we need to apply SUM function. But if we want to add numbers based on some conditions, we can add criteria with the help of SUMIFS function, SUMIFS can filter data with multiple criteria effectively. In ...

How to Sum with Criteria and Or Logic in Excel
How to Sum with Criteria and Or Logic in Excel 8

To add numbers together we need to apply SUM function. And if we want to add numbers based on some conditions, we can add criteria with the help of SUMIFS function, SUMIFS can filter data with multiple criteria effectively. If ...

How To Sum the Largest N Values in Excel

Sometimes we may want to sum the largest N numbers or top N numbers in a range. In this article, we will show you the method of “SUM the Largest N Numbers” by a simple formula which consist of SUMPRODUCT ...

How to Sum for Cell Contains Formula Only in Excel
How to Sum for Cell Contains Formula Only in Excel 9

Sometimes values are created by formulas in cells. If we want to sum values which are created by formulas from a range, but some values which are hardcoded also list in the same range, how can we filter out matched ...

How to Sum the Smallest N Values in Excel
How to Sum the Smallest N Values in Excel 15

Sometimes we may want to sum the first smallest N numbers in a range in Excel. In this article, we will show you the method of “SUM the Smallest N Numbers” by a simple formula which consist of SUMPRODUCT and ...

How to Subtotal Values for Groups and Only Keep One Subtotal for A Group in Column
How to Subtotal Values for Groups and Only Keep One Subtotal for A Group in Column14

Sometimes we may meet the case that subtotal values for different groups and only record a subtotal value for one group in a column, for other cells in this group, keep them blank. Today we will introduce you how can ...

Sidebar