Formula Errors

Limit a Calculated Value in Excel with MIN and IF

Anum MushtaqAnum Mushtaq Dec 2, 2026 868 views

Question details

Calculate a value from two cells only when a condition is met and limit the result to a maximum of 677.

Limit a Calculated Value in Excel with MIN and IF
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet needs a capped adjustment based on the values in I26 and J26.
Observed behavior
The desired formula multiplies J26 by the absolute value of I26 when I26 is negative, returns zero otherwise, and caps the result at 677.
Before you start

Check that I26 and J26 contain numeric values, and choose an empty cell for the result. Replace the cell references or the limit of 677 if your worksheet uses different inputs.

Solution 1Recommended

Use MIN and IF to cap the conditional calculation

Use this formula when the calculation should run only if I26 is negative.

1
Select the result cell

In Excel, click the empty cell where you want the capped adjustment to appear.

2
Enter the formula

Type =MIN(677,IF(I26<0,J26*-I26,0)) in the cell or formula bar, then press Enter.

3
Check the result

Change or review the values in I26 and J26: a negative I26 triggers the multiplication, while zero or a positive I26 returns 0. MIN limits the result to 677.

Use MIN and IF to cap the conditional calculation
Negative values in J26: If J26 is negative and I26 is negative, the formula can return a negative result. The MIN function enforces an upper limit, not a lower limit.
Calculate with WPS Spreadsheets

Apply the Same Capped Formula in WPS Spreadsheets

Open your workbook in WPS Spreadsheets and use MIN and IF to calculate and cap the adjustment.

  1. 1. Open the workbook: Launch WPS Spreadsheets and select Open to choose your Excel workbook.
  2. 2. Select a result cell: Click an empty cell where you want the capped value to appear.
  3. 3. Enter the formula: Type =MIN(677,IF(I26<0,J26*-I26,0)) in the cell or formula bar and press Enter.
  4. 4. Save the workbook: Select File > Save or Save As to save your changes in the desired spreadsheet format.
Calculate conditional adjustments with MIN and IFOpen and edit Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interfaceWork with spreadsheets using the free version of WPS Office
QA img-9

Frequently Asked Questions

How do I change the maximum from 677 to another value?

Replace 677 in the MIN formula with your preferred limit. For example, =MIN(500,IF(I26<0,J26*-I26,0)) caps the result at 500.

What happens when I26 is zero or positive?

The IF condition I26<0 is false, so =MIN(677,IF(I26<0,J26*-I26,0)) returns 0.

Why does the formula return a negative value?

If I26 and J26 are both negative, J26*-I26 is negative. MIN caps the upper value at 677 but does not prevent negative results.

What if Excel does not accept commas in the formula?

Your regional settings may require semicolons as argument separators. Try =MIN(677;IF(I26<0;J26*-I26;0)) in the formula bar.