How can I set minimum and maximum values in formulas in Google Sheets?

Google Sheets allows users to set minimum and maximum values in formulas to control the range of values that can be calculated. This feature is particularly useful for data validation and ensuring accuracy in calculations. Users can use the MIN and MAX functions within their formulas to specify the minimum and maximum values, respectively. These functions can be combined with other formulas to create complex conditions for data entry. With this capability, users can ensure that their formulas only calculate values within a specific range, providing more control over their data and improving the accuracy of their calculations.

Google Sheets: Set Minimum and Maximum Values in Formulas


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:

Google Sheets set minimum value in formula

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:

Google Sheets set max value for formula

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:

x