Restrict Cells to Accept Only Whole Numbers Using Data Validation
In this blog post we will learn to restrict the cells to accept only Whole Numbers with the help of “Data Validation” functionality in excel.
2. Click on Data Validation command under “Data Tools” group which will appear 03 further options and out of these 03 options again select “Data Validation”.
4. Under this dialog box, click on “Settings” tab and select the values in respective fields as shown below:
5. By entering the above values click on “OK” button and with this we can restrict the cell to accept the Whole Numbers which are between 5 to 10 in selected cell “B1”.
For example, we want to ask user to enter only Whole Numbers which are between values 5 to 10 and if user enters any other value which is beyond this range then the cell should not accept it.
For this we will use “Data Validation” functionality in excel. “Data Validation” can be found in “Data” tab under “Data Tools” group.
Now let’s see how we can use this “Data Validation” command to restrict cell to accept only Whole Numbers:
1. Select the cells in which we wish to restrict the Whole Numbers. In this case we want to restrict Whole Numbers in cell “B1”.
3. Once we click on “Data Validation” command, one dialog box named as “Data Validation” will appear on screen.
a. Allow: Whole Number
b. Data: Between
c. Minimum: 5
d. Maximum: 10
6. If we try to enter the any other value which is beyond this range then excel will throw an error as shown in below image.
More Criteria’s to restrict Cell to Accept Only Whole Numbers:
In above example, we have seen only one criteria to restrict cell to accept only Whole Numbers. There are some additional criteria’s available in excel by using which we can restrict the Whole Numbers in a cell.
These additional criteria’s are as listed below:
1. Between: With this option we can restrict cell to accept Whole Numbers which are between provided two values.
2. Not between: With this option we can restrict cell to accept Whole Numbers which is not between provided two values.
3. Equal to: With this option we can restrict cell to accept Whole Numbers which is equal to provided value.
4. Not equal to: With this option we can restrict cell to accept Whole Numbers which is not equal to provided value.
5. Greater than: With this option we can restrict cell to accept Whole Numbers which is greater than provided value.
6. Less than: With this option we can restrict cell to accept Whole Numbers which are less than provided value.
7. Greater than or equal to: With this option we can restrict cell to accept Whole Numbers which are greater than or equal to provided values.
8. Less than or equal to: With this option we can restrict cell to accept Whole Numbers which are less than or equal to provided values.
In this way we can restrict text cell in excel to accept only Whole Numbers with the help of various options.
Comments
Post a Comment