Formula Errors

How to Return the Minimum Value Without Negative Results in Excel

Chanuka GeekiyanageChanuka Geekiyanage Nov 3, 2026 869 views

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.

How to Return the Minimum Value Without Negative Results in Excel
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.
Before you start

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.

Solution 1Recommended

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.

1
Select the target cell

Click on the cell where you want the constrained calculation result to appear.

2
Input the MAX and MIN formula

Type the formula =MAX(0,MIN(7500,8500-A1)) into the formula bar.

3
Adjust cell references

Replace the values 7500 and 8500 with your specific fixed numbers, and change A1 to the correct cell reference for your dataset.

4
Execute the formula

Press Enter to calculate the result. The cell will now display a maximum of 7,500 and a minimum of zero.

Combine the MAX and MIN Functions
Formula Breakdown: In =MAX(0, MIN(7500, 8500-A1)), the formula first subtracts A1 from 8500. The MIN function caps this value at 7500. Finally, the MAX function ensures the final output is not less than 0.
Manage Data with WPS Spreadsheet

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. 1. Open your spreadsheet: Launch WPS Spreadsheet and open the document containing your numerical data.
  2. 2. Select the calculation cell: Click on the cell where you need to calculate the minimum value.
  3. 3. Enter the formula: Type =MAX(0, MIN(value1, calculation)) directly into the Formula Bar.
  4. 4. Get instant results: Press Enter to instantly get your accurately constrained calculation.
100% compatible with Microsoft Excel formulas and file formats (.xlsx).Built-in formula suggestions and real-time error checking.Lightweight software with a fast, intuitive tabbed interface.Completely free to download and use for your daily calculation needs.
microsoft office alternative - wps office

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.