# Excel Formula to Find the Minimum Value Excluding Zero

When working with data in Microsoft Excel, you may sometimes need to find the **minimum value** in a range of cells while **excluding any zero values**. In this article, we’ll provide the formula to accomplish this task and explain how it works, along with examples to illustrate its usage. By the end, you’ll have a clear understanding of how to find the minimum non-zero value in an Excel range.

## Formula to Find the Minimum Value Excluding Zero

The Excel formula to find the **minimum value excluding zero** is:

=MIN(IF(range<>0,range))

This formula uses the MIN and IF functions together to locate the smallest number in a range of cells, ignoring any cells that contain zero. It’s a handy way to get the minimum value when zeros are present but should not be considered.

## Understanding the Formula Components

Before we dive into examples, let’s break down the components of the formula:

### MIN Function

The MIN function returns the **lowest number** in a set of values. Its syntax is:

=MIN(number1, [number2], …)

You can provide individual numbers, cell references, ranges, or a mix as arguments.

### IF Function

The IF function performs a **logical test** and returns one value if the test is TRUE, and another if it’s FALSE. The syntax is:

=IF(logical_test, value_if_true, [value_if_false])

- logical_test: The condition to be evaluated
- value_if_true: Result if logical_test is TRUE
- value_if_false: Result if logical_test is FALSE (optional)

### Combining MIN and IF

By nesting the IF function inside MIN, we can find the minimum value while applying a condition to the range, in this case, excluding cells with zero:

=MIN(IF(range<>0,range))

The IF part checks each cell in the range to see if it’s not equal to zero (<>0). If true, the cell value is returned to MIN. If false (the cell is zero), the IF returns FALSE and MIN ignores it.

## Examples

Let’s look at a few examples to see the formula in action. Consider the following data in cells A1:A10:

A |
---|

25 |

0 |

18 |

37 |

12 |

0 |

29 |

7 |

42 |

0 |

### Example 1: Finding Minimum in a Column

To get the **minimum non-zero value** in column A, enter this formula in another cell:

=MIN(IF(A1:A10<>0,A1:A10))

The result will be 7, the smallest number excluding the zeros.

### Example 2: Finding Minimum in a Row

If your data is laid out horizontally, like in cells A1:J1, the formula would be:

=MIN(IF(A1:J1<>0,A1:J1))

This finds the minimum value greater than zero in row 1.

### Example 3: Using a Named Range

You can also use a **named range** in the formula. Let’s say you’ve defined the name “Scores” for cells A1:A10. The formula would be:

=MIN(IF(Scores<>0,Scores))

Excel will find the minimum value in the Scores range while ignoring zero cells.

### Example 4: Handling Text and Empty Cells

If your range contains text or empty cells, the formula will still work correctly. Consider this data:

A |
---|

25 |

0 |

18 |

Hello |

12 |

29 |

7 |

42 |

0 |

Using =MIN(IF(A1:A10<>0,A1:A10)), the result is 7. The IF function returns FALSE for the text “Hello” and the empty cell, so MIN disregards them, focusing only on the numeric non-zero values.

## Handling #NUM! Errors

Sometimes, if all cells in the range are zero, you’ll get a #NUM! error from the formula. This happens because MIN has no numeric values to work with after IF removes all the zeros.

To avoid this, use the **IFERROR** function to catch the error and return an alternative result like zero or a message. Wrap the entire formula inside IFERROR:

=IFERROR(MIN(IF(range<>0,range)), 0)

=IFERROR(MIN(IF(range<>0,range)), “No non-zero values”)

## Variations of the Formula

You can modify the formula to find the minimum based on other criteria besides zero.

### Excluding Negative Values

To find the **minimum positive value**, change the IF condition from “<>0” to “>0”:

=MIN(IF(range>0,range))

### Finding Minimum Filtered Value

If your data is filtered, use the **SUBTOTAL** function with option 5 to find the minimum in only the visible cells:

=SUBTOTAL(5,IF(range<>0,range))

### Finding Minimum from Multiple Criteria

You can add more conditions by joining them with Boolean operators like AND/OR in the IF part. For example, to find the minimum value between 10 and 100 excluding zeros:

=MIN(IF((range<>0)*(range>=10)*(range<=100),range))

The asterisks (*) perform AND logic on the conditions.

## Alternative Methods

While the =MIN(IF(range<>0,range)) formula is effective, there are other ways to find the minimum non-zero value in Excel.

### SMALL Function

The **SMALL** function returns the k-th smallest value in a range. You can use it with COUNTIF to find the position of the minimum non-zero value:

=SMALL(range,COUNTIF(range,0)+1)

This assumes the range has at least one non-zero number. COUNTIF counts the zeros, and adding 1 gives the position of the smallest value after the zeros.

### Array Formula

You can also use an **array formula** (entered with Ctrl+Shift+Enter) to get the minimum excluding zeros:

=MIN(IF(range<>0,range,MAX(range)+1))

If a cell is zero, the IF function returns a value larger than the maximum in the range, effectively removing it from MIN’s consideration.

## Real-World Applications

Knowing how to find the minimum value excluding zeros in Excel is useful in various real-world scenarios:

**Sales Data**: Find the lowest sales figure while ignoring months with no sales (zeros).**Test Scores**: Determine the minimum passing score, excluding students who didn’t take the test (zeros).**Inventory Management**: Locate the product with the least stock, skipping items that are out of stock (zeros).**Financial Analysis**: Find the smallest expense or revenue amount, ignoring categories with no transactions (zeros).

By applying this formula in such situations, you can quickly get insights from your data without the influence of zero values.

## Final Thoughts

The Excel formula =MIN(IF(range<>0,range)) is a powerful tool for **finding the minimum value in a range while excluding cells containing zero**. By combining the MIN and IF functions, you can apply criteria to narrow down the values MIN considers. This technique is useful in various scenarios like finding lowest sales figures, minimum scores, etc. where zero entries should be ignored.

Understanding this formula opens up possibilities for more advanced variations to analyze your data. Remember to handle potential #NUM! errors with IFERROR. You can also explore alternative methods like using SMALL with COUNTIF or array formulas for similar results.

Try out the formula with your own datasets and see how it can simplify your Excel tasks. Experiment with the variations and adapt them to your specific needs. With practice, you’ll be able to extract valuable insights from your data efficiently.

## FAQs

### What is the Excel formula to find the minimum value excluding zero?

The Excel formula to find the minimum value excluding zero is: `=MIN(IF(range<>0,range))`

. This formula uses the MIN and IF functions together to locate the smallest number in a range of cells, ignoring any cells that contain zero.

### How does the MIN function work in Excel?

The MIN function returns the lowest number in a set of values. Its syntax is: `=MIN(number1, [number2], ...)`

. You can provide individual numbers, cell references, ranges, or a mix as arguments.

### What does the IF function do in Excel?

The IF function performs a logical test and returns one value if the test is TRUE, and another if it’s FALSE. The syntax is: `=IF(logical_test, value_if_true, [value_if_false])`

. It allows you to apply conditions to your formulas.

### How can I handle #NUM! errors when using the MIN(IF(range<>0,range)) formula?

To avoid #NUM! errors when all cells in the range are zero, use the IFERROR function to catch the error and return an alternative result like zero or a message. Wrap the entire formula inside IFERROR, like this: `=IFERROR(MIN(IF(range<>0,range)), 0)`

or `=IFERROR(MIN(IF(range<>0,range)), "No non-zero values")`

.

### Can I modify the formula to find the minimum value based on other criteria besides zero?

Yes, you can modify the formula to find the minimum based on other criteria. For example, to find the minimum positive value, change the IF condition from “<>0” to “>0”: `=MIN(IF(range>0,range))`

. You can also add more conditions using Boolean operators like AND/OR in the IF part.

### Are there alternative methods to find the minimum value excluding zero in Excel?

Yes, there are alternative methods to find the minimum non-zero value in Excel. One way is to use the SMALL function with COUNTIF: `=SMALL(range,COUNTIF(range,0)+1)`

. Another option is to use an array formula (entered with Ctrl+Shift+Enter): `=MIN(IF(range<>0,range,MAX(range)+1))`

.

Vaishvi Desai is the founder of Excelsamurai and a passionate Excel enthusiast with years of experience in data analysis and spreadsheet management. With a mission to help others harness the power of Excel, Vaishvi shares her expertise through concise, easy-to-follow tutorials on shortcuts, formulas, Pivot Tables, and VBA.