How to Show a Warning for Zero or Negative Values in Excel
Question details
The user needs to configure Excel to display a warning alert when a cell's value drops to zero or becomes negative.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Preventing invalid data entry or highlighting calculation results that are restricted to positive values.
- Observed behavior
- By default, cells accept zero or negative numbers without alerting the user, which can lead to data errors in specific workflows.
Determine whether the target cell value will be typed in manually by a user or generated automatically by a formula, as each scenario requires a completely different approach to trigger a warning.
Use Data Validation for Manually Entered Values
Set up a custom data validation rule to trigger a pop-up error alert if a user tries to type a zero or negative number.
Data Validation is the most effective method for controlling manual data entry. It actively stops or warns the user at the exact moment they attempt to input an invalid figure.
Click on the cell or highlight the range of cells where you want to restrict negative numbers and zeros (for example, cell A1).
Navigate to the Data tab on the Excel ribbon and click on Data Validation.
In the Settings tab, click the Allow drop-down menu and select 'Custom'. In the Formula box, type =A1>0 (replace A1 with the reference of your currently selected active cell).
Switch to the Error Alert tab. Enter a Title (e.g., 'Invalid Entry') and an Error message (e.g., 'Please enter a number greater than zero.'). Click OK to apply the rule.

Use Conditional Formatting for Formula Results
Automatically highlight cells in a warning color if their calculated formula result drops to zero or below.
Easily Set Up Data Alerts in WPS Spreadsheet
WPS Spreadsheet provides a highly intuitive interface for applying Data Validation and Conditional Formatting, ensuring your financial, inventory, or grading data remains strictly positive without hassle.
- 1. Open your file in WPS Spreadsheet: Launch WPS Office and open your existing spreadsheet.
- 2. Select the required cells: Click and drag to select the cells you want to restrict to positive numbers.
- 3. Access Data Validation: Navigate to the Data tab on the top ribbon and click on the Data Validation icon.
- 4. Set the Custom Formula: Choose Custom from the Allow drop-down menu and input =A1>0 (adjusting A1 to match your active cell).
- 5. Customize the Warning: Go to the Error Alert tab, type out your custom warning text explaining that zero or negative values are not allowed, and click OK.

Frequently Asked Questions
Can I show a warning but still allow the user to enter the negative number?
Yes. In the Data Validation dialog, under the Error Alert tab, change the 'Style' dropdown from 'Stop' to 'Warning' or 'Information'. This prompts the user with your message but gives them the option to click 'Yes' or 'OK' to proceed with the invalid entry.
Why didn't the data validation pop up when my formula calculated a negative number?
Data Validation only evaluates input at the exact moment a user types it in and presses Enter. For dynamic formula results that change based on other cells, you must use Conditional Formatting to visually flag the cell.
How do I remove the zero or negative warning rule later?
Select the restricted cells, go to the Data tab, and click Data Validation. In the bottom left corner of the dialog box, click 'Clear All', then click OK to remove the restrictions.




