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.

**#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**.

**#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**.

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

### 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

How to Use 3D SUM Multiple Worksheets
To sum a range of numbers is straightforward for most Excel users, but do you know how to establish a 3D reference to total the same range of numerous sheets. In this post, I will present the steps for this ...

Average per Week by Formula in Excel
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
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
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
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
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
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
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 ...