Office Settings & Configuration

Excel Data Validation for Whole Numbers Between 300 and 8000

Huda QurayshiHuda Qurayshi Dec 2, 2026 868 views

Question details

Restrict selected cells to whole numbers from 300 through 8000 and provide a prompt for blank red cells.

Validate Whole Numbers Between 300 and 8000 in Excel
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.
Before you start

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.

Solution 1Recommended

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.

1
Select the cells

Select the red input cells or the target range on the worksheet.

2
Set the allowed range

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.

3
Add an input prompt

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.”

4
Block invalid typed entries

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.

5
Test the rule

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.

Set a whole-number rule and input prompt in Excel
How the prompt works: The input message appears whenever a validated cell is selected, even if it already contains a value. It does not automatically warn about untouched blank cells. Pasting or deleting values can also bypass normal validation checks.
WPS Spreadsheet

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. 1. Open the workbook: Open WPS Spreadsheet and use Open to select your Excel workbook.
  2. 2. Select the input cells: Select the red cells or other range where users will enter values.
  3. 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. 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.
Set inclusive whole-number limits for selected cellsShow instructions and an error alert for data entryOpen and edit Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interface
microsoft office alternative - wps office

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.