Statistical function

MINIFS function

Returns the smallest number among the rows that meet one or more conditions, e.g. the cheapest quote for a given item.

Available in Microsoft 365, Excel 2019 and later, Excel for the web

Excel 2019 and laterWorks in Google Sheets

Syntax

MINIFS(min_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
ArgumentWhat it means
min_rangeRequiredThe cells containing the numbers to take the minimum from.
criteria_range1RequiredThe range tested by the first condition, the same size as min_range.
criteria1RequiredThe condition, e.g. "Paper", ">0", or a cell reference.
criteria_range2, criteria2, ...OptionalAdditional range/condition pairs; all must match.

Returns: The smallest number among matching rows, or 0 if no row matches.

How MINIFS works

MINIFS filters rows by one or more conditions and returns the smallest value among them. Typical questions: what is the cheapest quote for toner, the lowest score in class 3B, the earliest order date for a customer, or the fastest delivery from a given carrier? Conditions are combined with AND and follow the same rules as SUMIFS and COUNTIFS.

A very common use is ignoring zeros or blanks entered as 0: add a condition ">0" on the value range itself. Note that if no row matches, MINIFS returns 0, which can look like a real minimum; guard against that with COUNTIFS. MINIFS is available from Excel 2019; older versions need =MIN(IF(...)) as an array formula.

Examples

1Cheapest paper quote

E2fx=MINIFS(C2:C7, B2:B7, "Paper")
ABCDE
1SupplierItemPrice
2AcmePaper4.80
3BrixPaper4.35
4AcmeToner62
5CordaPaper0
6BrixToner58.5
7CordaToner64

Result: 0

Paper quotes are 4.80, 4.35 and 0. Corda left its price at 0 (no quote yet), so the plain minimum is 0, which is misleading. See the next example.

2Ignore zero quotes

E2fx=MINIFS(C2:C7, B2:B7, "Paper", C2:C7, ">0")
ABCDE
1SupplierItemPrice
2AcmePaper4.84.35
3BrixPaper4.35
4AcmeToner62
5CordaPaper0
6BrixToner58.5
7CordaToner64

Result: 4.35

The second condition removes the 0, and the cheapest real paper quote is 4.35 from Brix.

3Supplier and item together

E2fx=MINIFS(C2:C7, A2:A7, "Brix", B2:B7, "Toner")
ABCDE
1SupplierItemPrice
2AcmePaper4.858.5
3BrixPaper4.35
4AcmeToner62
5CordaPaper0
6BrixToner58.5
7CordaToner64

Result: 58.5

Only one row matches both conditions, so the answer is Brix's toner price 58.5 (58.50 with two-decimal formatting).

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 16 KB

Common errors and how to fix them

ErrorWhy it happensFix
#VALUE!The ranges are not the same size.Use ranges with identical dimensions.
#NAME?Excel 2016 or earlier does not have MINIFS.Use =MIN(IF(B2:B7="Paper",C2:C7)) with Ctrl+Shift+Enter.
Result is 0No row matched, or a matching row contains 0.Check the conditions with COUNTIFS and add ">0" if zeros mean missing data.

Tips

  • Combine with XLOOKUP to name the cheapest supplier: =XLOOKUP(1,(B2:B7="Paper")*(C2:C7=E2),A2:A7).
  • Dates work too: the earliest order per customer is =MINIFS(OrderDate, Customer, H2), formatted as a date.

Questions

How do I make MINIFS ignore blanks and zeros?

Add the value range again as a criteria range with ">0". Truly empty cells are already ignored.

Is MINIFS case-sensitive?

No. "paper" and "Paper" match the same rows. For case-sensitive matching use =MIN(IF(EXACT(B2:B7,"Paper"),C2:C7)).

Google Sheets

MINIFS also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.

MINIFS in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
DanishMINHVISER
DutchMIN.ALS.VOORWAARDEN
FinnishMIN.JOS.JOUKKO
FrenchMIN.SI.ENS
GermanMINWENNS
HungarianMINHA
ItalianMIN.PIÙ.SE
Norwegian (Bokmål)MIN.HVIS.SETT
PolishMIN.WARUNKÓW
Portuguese (Brazil)MÍNIMOSES
Portuguese (Portugal)MÍNIMO.SE.S
RussianМИНЕСЛИ
SpanishMIN.SI.CONJUNTO
TurkishÇOKEĞERMİN