← All how-to recipes

How to find the minimum value excluding zeros

✓ Verified in LibreOffice 25.8.7.3

The smallest non-zero value — lowest actual price, shortest real time, ignoring empty/zero placeholders.

The formula

AppFormulaNotes
Excel=MINIFS(A2:A6,A2:A6,">0")Excel 2019+. Older Excel: =MIN(IF(A2:A6>0,A2:A6)) entered with Ctrl+Shift+Enter.
Google Sheets=MINIFS(A2:A6,A2:A6,">0")Identical; =MIN(FILTER(A2:A6,A2:A6>0)) also works.
LibreOffice Calc=MINIFS(A2:A6,A2:A6,">0")Identical.

How it works

Plain MIN would return 0 here because the zeros are the smallest values. MINIFS applies a condition — take the minimum of the range only where the same range is greater than 0 — so it skips the zeros and returns 8, the smallest real value. This matters when 0 stands for 'no data' rather than an actual measurement. MINIFS needs Excel 2019+ (it's in Google Sheets and LibreOffice); on older Excel use the MIN(IF(...)) array formula, or MIN(FILTER(...)) on modern versions. The same pattern with MAXIFS finds the largest under a condition.

Verified, not just documented

We ran =MINIFS(A2:A6,A2:A6,">0") in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 8 — exactly the expected result. Every formula here is confirmed by actually executing it.