How to Return the Minimum Value Without Negative Results in Excel
Question details
The user needs a formula that calculates a minimum value between a fixed amount and a difference, but restricts negative outcomes to zero.

- Product
- Excel / WPS Spreadsheet
- Device & OS
- not provided
- Scenario
- Calculating constrained financial or numerical data where negative results are invalid and must be capped at a floor of zero.
- Observed behavior
- The goal is to return the smaller of two values, but substitute zero if the resulting calculation falls below zero.
Ensure you have identified the cell references for your calculation and determined both the maximum limit (ceiling) and the minimum limit (floor) for your data.
Combine the MAX and MIN Functions
Nest the MIN function inside a MAX function to enforce both an upper limit and a zero floor in a single formula.
The MIN function evaluates a fixed number against a calculation, returning whichever is smaller. By wrapping this logic inside a MAX function containing a zero, any negative result produced by the MIN function is automatically overridden by zero.
Click on the cell where you want the constrained calculation result to appear.
Type the formula =MAX(0,MIN(7500,8500-A1)) into the formula bar.
Replace the values 7500 and 8500 with your specific fixed numbers, and change A1 to the correct cell reference for your dataset.
Press Enter to calculate the result. The cell will now display a maximum of 7,500 and a minimum of zero.

Use an IF Statement for Conditional Logic
Use the IF function combined with MIN to explicitly define the condition for negative numbers.
Easily Apply Advanced Formulas in WPS Office
WPS Spreadsheet fully supports essential Excel functions like MAX, MIN, and IF, allowing you to seamlessly calculate constrained values and manage complex datasets efficiently.
- 1. Open your spreadsheet: Launch WPS Spreadsheet and open the document containing your numerical data.
- 2. Select the calculation cell: Click on the cell where you need to calculate the minimum value.
- 3. Enter the formula: Type =MAX(0, MIN(value1, calculation)) directly into the Formula Bar.
- 4. Get instant results: Press Enter to instantly get your accurately constrained calculation.

Frequently Asked Questions
Can I use this formula to set a minimum value other than zero?
Yes. To set a different minimum floor, change the '0' in the MAX function to your desired minimum number. For example, using =MAX(100, MIN(7500, 8500-A1)) ensures the final result will never fall below 100.
Why is my formula returning a #VALUE! error instead of a number?
This error occurs if the referenced cell (like A1) contains text instead of a valid numeric value. Ensure the target cell is formatted as a number or currency and contains no alphabetical characters or hidden spaces.
Does WPS Spreadsheet fully support the MAX and MIN functions?
Absolutely. WPS Spreadsheet is highly compatible with Microsoft Excel and fully supports all standard mathematical and logical functions like MAX, MIN, and IF without requiring any modifications to your formulas.




