You can use the following methods to set a limit on the minimum and maximum values that can be returned by formulas in Excel:
Method 1: Set Minimum Value
=MAX(300,(SUM(B2:D2)))
This particular formula calculates the sum of values in the range B2:D2, but if the sum is less than 300 then the formula simply returns 300.
Method 2: Set Maximum Value
=MIN(300,(SUM(B2:D2)))
This particular formula calculates the sum of values in the range B2:D2, but if the sum is greater than 300 then the formula simply returns 300.
Method 3: Set Both Minimum and Maximum Values
=MIN(320,MAX(280,SUM(B2:D2)))
This particular formula calculates the sum of values in the range B2:D2, but if the sum is less than 280 or greater than 320, the formula simply returns these lower or upper limits.
The following examples show how to use each method in practice with the following dataset in Excel that contains information about exam scores for various students in some class:
Example 1: Set Minimum Value that Can Be Returned by Formula
Suppose we would like to calculate the sum of exam scores for each student but we want the minimum value to be set at 300.
We can type the following formula into cell E2:
=MAX(300,(SUM(B2:D2)))
We can then click and drag this formula down to each remaining cell in column E:
The formula either returns the sum of exam scores or the value 300 if the sum is less than 300.
Example 2: Set Maximum Value that Can Be Returned by Formula
Suppose we would like to calculate the sum of exam scores for each student but we want the maximum value to be set at 300.
We can type the following formula into cell E2:
=MIN(300,(SUM(B2:D2)))
We can then click and drag this formula down to each remaining cell in column E:
The formula either returns the sum of exam scores or the value 300 if the sum is greater than 300.
Example 3: Set Both Minimum and Maximum Values that Can Be Returned by Formula
Suppose we would like to calculate the sum of exam scores for each student but we want the minimum and maximum values to be set at 280 and 300, respectively.
We can type the following formula into cell E2:
=MIN(320,MAX(280,SUM(B2:D2)))
We can then click and drag this formula down to each remaining cell in column E:
The formula either returns the sum of exam scores or the value 280 or 320 if the sum is outside of these limits.
Additional Resources
The following tutorials explain how to perform other common tasks in Excel:
Excel: How to Highlight Max Value in Each Row
Excel: How to Create Min Max and Average Chart
Excel: How to Find Max Value by Group