How to Apply Minimum and Maximum Limits in One Excel Formula
Question details
The user needs to constrain a calculation result so that it does not exceed a maximum cap or fall below a minimum floor using a single formula.

- Product
- Spreadsheet
- Device & OS
- not provided
- Scenario
- Calculating numeric values (like commissions, bonuses, or deductions) where business rules dictate strict upper and lower limits.
- Observed behavior
- Formulas naturally return the exact mathematical calculation, which may fall outside the desired minimum and maximum bounds unless explicitly constrained.
Identify the exact upper limit and lower limit required for your calculation, and verify that your base formula computes the expected unconstrained value before applying boundaries.
Combine MAX and MIN Functions in One Formula
Nest the MIN function inside the MAX function to create a double boundary that enforces both a floor and a ceiling on your calculation.
The MIN function effectively sets the ceiling (upper limit) by returning the smaller of the calculated value or your defined cap. Conversely, the MAX function sets the floor (lower limit) by returning the larger of the MIN result or your defined minimum threshold.
By nesting these functions, you create a seamless range limit without needing complex IF statements.
Click on the cell where you want the limited calculation result to be displayed.
Start by applying the upper limit using the formula structure =MIN(UpperLimit, YourFormula). For example, if your cap is 750, type =MIN(750, E35*0.25%).
Wrap the MIN formula within a MAX function to establish the lower limit. To prevent the result from falling below zero, modify the formula to: =MAX(MIN(750, E35*0.25%), 0).
Press Enter on your keyboard to apply the formula. Use the fill handle at the bottom right of the cell to drag and copy the formula to other rows if needed.

Easily Apply Advanced Formulas with WPS Spreadsheet
WPS Spreadsheet offers powerful, built-in support for all standard spreadsheet functions, including MIN, MAX, and complex nested formulas, making data analysis highly efficient.
- 1. Open your workbook in WPS Spreadsheet: Launch WPS Office and open the spreadsheet containing the data you want to calculate.
- 2. Input the nested formula: Select the desired cell and type your =MAX(MIN(...)) formula directly into the formula bar.
- 3. Utilize formula prompts: Rely on WPS's intelligent tooltip prompts and color-coded parentheses to ensure your syntax is perfectly formatted before pressing Enter.

Frequently Asked Questions
Can I use the MEDIAN function instead of MIN and MAX to set limits?
Yes, you can use the MEDIAN function as a streamlined alternative. The syntax =MEDIAN(LowerLimit, UpperLimit, Value) returns the middle value, effectively bounding your calculation. For example, =MEDIAN(0, 750, E35*0.25%) accomplishes the exact same result.
What happens if my lower limit is greater than my upper limit in the formula?
If the lower limit inside your MAX function is higher than the upper limit inside your MIN function, the formula will always evaluate to the lower limit value. You should ensure your boundary values are logically ordered.
How do I apply these formula limits across an entire column of data?
Enter the combined MAX and MIN formula in the first cell of your target column. Then, click the small square at the bottom-right corner of the cell (the fill handle) and drag it down. The relative cell references (like E35) will automatically update for each row.
Does WPS Office fully support nested formulas like MAX and MIN?
Yes, WPS Spreadsheet fully supports nested functions and is 100% compatible with Excel formulas. You can combine up to 64 levels of nested functions within a single cell.




