How to Use MIN Function and Exclude Zero in Google Sheets

The MIN function in Google Sheets is used to find the smallest value in a given range of cells. To exclude zero from the range, you need to wrap the MIN formula in an IF statement that checks for zero and ignores it if found. This way you can find the smallest non-zero value in the range. The IF statement also allows you to use conditional formatting to highlight the min value.


There are two common ways to use the MIN function in Google Sheets to find the minimum value in a range while excluding cells that are equal to zero:

Method 1: Use MIN & FILTER

=MIN(FILTER(B2:B15, B2:B15<>0))

Method 2: Use MINIFS

=MINIFS(B2:B15, B2:B15, "<>0")

Both formulas find the minimum value in the cell range B2:B15, excluding any cells that are equal to zero.

The following examples show how to use each method in practice with the following dataset that shows the number of sales made by various employees at some company:

Example 1: Use MIN & FILTER

We can use the following formula with the MIN and FILTER functions to find the minimum value in the sales column while excluding all values equal to zero:

=MIN(FILTER(B2:B15, B2:B15<>0))

We’ll type this formula into cell D2 and then press Enter:

Google Sheets MIN function excluding zeros

From the output we can see that the minimum value in the sales column (excluding all values equal to zero) is 2.

This formula works by first filtering the range for values that are not equal to zero, then finding the minimum of the remaining values.

Example 2: Use MINIFS

We can use the following formula with the MINIFS functions to find the minimum value in the sales column while excluding all values equal to zero:

=MINIFS(B2:B15, B2:B15, "<>0")

We’ll type this formula into cell D2 and then press Enter:

Google Sheets MINIFS function excluding zero

From the output we can see that the minimum value in the sales column (excluding all values equal to zero) is 2.

This formula works by finding the minimum value in the range only if the value in the range is not equal to zero.

x