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], ...)| Argument | What it means | |
|---|---|---|
min_range | Required | The cells containing the numbers to take the minimum from. |
criteria_range1 | Required | The range tested by the first condition, the same size as min_range. |
criteria1 | Required | The condition, e.g. "Paper", ">0", or a cell reference. |
criteria_range2, criteria2, ... | Optional | Additional 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
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Supplier | Item | Price | ||
| 2 | Acme | Paper | 4.8 | 0 | |
| 3 | Brix | Paper | 4.35 | ||
| 4 | Acme | Toner | 62 | ||
| 5 | Corda | Paper | 0 | ||
| 6 | Brix | Toner | 58.5 | ||
| 7 | Corda | Toner | 64 |
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
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Supplier | Item | Price | ||
| 2 | Acme | Paper | 4.8 | 4.35 | |
| 3 | Brix | Paper | 4.35 | ||
| 4 | Acme | Toner | 62 | ||
| 5 | Corda | Paper | 0 | ||
| 6 | Brix | Toner | 58.5 | ||
| 7 | Corda | Toner | 64 |
Result: 4.35
The second condition removes the 0, and the cheapest real paper quote is 4.35 from Brix.
3Supplier and item together
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Supplier | Item | Price | ||
| 2 | Acme | Paper | 4.8 | 58.5 | |
| 3 | Brix | Paper | 4.35 | ||
| 4 | Acme | Toner | 62 | ||
| 5 | Corda | Paper | 0 | ||
| 6 | Brix | Toner | 58.5 | ||
| 7 | Corda | Toner | 64 |
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).
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#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 0 | No 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.
| Language | Function name |
|---|---|
| Danish | MINHVISER |
| Dutch | MIN.ALS.VOORWAARDEN |
| Finnish | MIN.JOS.JOUKKO |
| French | MIN.SI.ENS |
| German | MINWENNS |
| Hungarian | MINHA |
| Italian | MIN.PIÙ.SE |
| Norwegian (Bokmål) | MIN.HVIS.SETT |
| Polish | MIN.WARUNKÓW |
| Portuguese (Brazil) | MÍNIMOSES |
| Portuguese (Portugal) | MÍNIMO.SE.S |
| Russian | МИНЕСЛИ |
| Spanish | MIN.SI.CONJUNTO |
| Turkish | ÇOKEĞERMİN |