In this example, we restrict users to enter a whole number from 0 and 10.
On the Data tab, click the Data Validation drop down and select Data Validation.
Enter the minimum and maximum numbers.
Select your title and input message.
Select your error message.
Click OK and test the data input. Try to enter a number outside of 0 to 10 or even a letter. You will then get the custom error message that you just created.