You can use the following methods to set a limit on the minimum and maximum values that can be returned by formulas in Google Sheets:

**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(305,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 **305**, 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 Google Sheets that shows the exam scores received by 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 305, respectively.

We can type the following formula into cell **E2**:

=MIN(305,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 **305** if the sum is outside of these limits.

**Additional Resources**

The following tutorials explain how to perform other common tasks in Google Sheets:

Google Sheets: How to Highlight Max Value in Each Row

Google Sheets: How to Find Max Value by Group

Google Sheets: How to Use MIN Function and Exclude Zero