Excel Data Validation for Whole Numbers Between 300 and 8000
Question details
Restrict selected cells to whole numbers from 300 through 8000 and provide a prompt for blank red cells.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Users enter values in designated red cells on a worksheet.
- Observed behavior
- The desired result is to accept only whole numbers within the inclusive range and prompt users to fill in the designated cells.
Identify the red cells that need validation and select the range where users will enter values. Check whether the range already has data validation rules, because applying a new rule will replace them.
Set a whole-number rule and input prompt in Excel
Use Excel's built-in validation to restrict entries and show instructions when a target cell is selected.
Select the red input cells or the target range on the worksheet.
Go to Data > Data Validation. On the Settings tab, choose Whole number under Allow and between under Data, then enter 300 as the minimum and 8000 as the maximum.
Open the Input Message tab, select Show input message when cell is selected, and enter a message such as “If this cell is blank, enter a whole number from 300 to 8000.”
On the Error Alert tab, enable the alert, choose Stop, and enter an explanation such as “Enter a whole number from 300 to 8000.” Click OK.
Select a target cell to see the prompt. Try entering 300, 8000, a decimal, and a number outside the range to check that the rule works.

Use a custom validation formula in Excel
Use a formula if you prefer a custom rule for the selected range.
Set the same whole-number limits in WPS Spreadsheet
Use Data Validation in WPS Spreadsheet to limit entries to whole numbers from 300 through 8000 and provide an entry prompt.
- 1. Open the workbook: Open WPS Spreadsheet and use Open to select your Excel workbook.
- 2. Select the input cells: Select the red cells or other range where users will enter values.
- 3. Set the limits: Go to Data > Data Validation. Choose Whole number and between, then set the minimum to 300 and the maximum to 8000.
- 4. Add messages and test: Use the input message and error alert options to add instructions and a Stop alert. Click OK, then test an allowed value and an out-of-range value.

Frequently Asked Questions
Are 300 and 8000 allowed by the validation rule?
Yes. In Data > Data Validation, the Whole number rule with between includes both the minimum and maximum values.
Will Excel's input message appear only when a cell is blank?
No. An input message appears when the validated cell is selected, whether it is blank or filled. A blank-only prompt requires a different approach, such as a worksheet selection event using VBA.
How can I stop users from typing a decimal or out-of-range number?
In Data > Data Validation, set Allow to Whole number and the limits to 300 and 8000. On the Error Alert tab, enable the alert and select Stop.
Does data validation guarantee that every red cell is filled?
No. Untouched blank cells can remain blank, and deleting or pasting values may bypass normal checks. Review the input range separately for blanks and invalid values.




