# MIN and MAX Function in Excel: Syntax, MINIFS, MAXIFS
> Find the lowest and highest value in Excel with MIN and MAX, then add conditions with MINIFS and MAXIFS and look up the row that holds the top value.

- Web page: https://logicexcel.com/functions/min-max
- Language: en
- Also in: [Deutsch](https://logicexcel.com/de/functions/min-max.md), [Español](https://logicexcel.com/es/functions/min-max.md), [Français](https://logicexcel.com/fr/functions/min-max.md)
- Updated: 2026-11-03
- Practice this in the browser: https://logicexcel.com/practice/19

To find the lowest number in a range, type `=MIN(C2:C9)`. For the highest, type `=MAX(C2:C9)`. Both ignore blank cells and text, and both return a plain number you can use in other formulas. To get the lowest or highest value for one group only, switch to `=MINIFS(C2:C9,B2:B9,"VW")` or MAXIFS.

This page covers MIN and MAX, the zero trap, conditional versions, finding which row holds the value, and the errors that give a surprising answer.

## TL;DR

- `=MIN(range)` returns the smallest number and `=MAX(range)` the largest. Text, blanks and TRUE/FALSE inside a range are skipped.
- A zero is a real number. If missing prices are stored as 0, MIN returns 0. Use `=MINIFS(C2:C9,C2:C9,">0")` to skip them.
- MINIFS and MAXIFS find the lowest or highest value that meets conditions. The range to examine comes first.
- MIN and MAX return the value, not the row. To get the name beside it, wrap it in INDEX and MATCH.
- On a column with no numbers at all, MIN and MAX return 0, not an error.
- MINIFS and MAXIFS need Excel 2019, Microsoft 365 or Excel for the web. Older versions show #NAME?.

## Table of Contents

- [The sample data used on this page](#the-sample-data-used-on-this-page)
- [MIN and MAX syntax and arguments](#min-and-max-syntax-and-arguments)
- [MIN and MAX examples, from one column to a lookup](#min-and-max-examples-from-one-column-to-a-lookup)
- [MINIFS and MAXIFS: the lowest or highest for a group](#minifs-and-maxifs-the-lowest-or-highest-for-a-group)
- [How to ignore zeros in MIN](#how-to-ignore-zeros-in-min)
- [Find the name that goes with the lowest or highest value](#find-the-name-that-goes-with-the-lowest-or-highest-value)
- [MIN and MAX compared with other options](#min-and-max-compared-with-other-options)
- [Which Excel versions have these functions](#which-excel-versions-have-these-functions)
- [MIN and MAX errors and surprises](#min-and-max-errors-and-surprises)
- [What learners get wrong](#what-learners-get-wrong)
- [A worked job: picking a used car shortlist](#a-worked-job-picking-a-used-car-shortlist)
- [Practice MIN and MAX in the browser](#practice-min-and-max-in-the-browser)
- [FAQ](#faq)
- [Sources](#sources)

## The sample data used on this page

The sheet is a dealer's used-car list. Column C is the asking price and D is the mileage in kilometers. The Fiesta has a price of 0 because the dealer has not priced it yet. Column E is the date each car was listed.

| | A | B | C | D | E |
|---|---|---|---|---|---|
| 1 | Car | Brand | Price | Mileage | Listed |
| 2 | Corolla | Toyota | 185000 | 72000 | 2026-09-02 |
| 3 | Golf | VW | 210000 | 55000 | 2026-09-14 |
| 4 | Polo | VW | 150000 | 90000 | 2026-09-20 |
| 5 | Hilux | Toyota | 320000 | 110000 | 2026-10-03 |
| 6 | Fiesta | Ford | 0 | 64000 | 2026-10-11 |
| 7 | Ranger | Ford | 410000 | 38000 | 2026-10-19 |
| 8 | Yaris | Toyota | 165000 | 81000 | 2026-10-27 |
| 9 | Tiguan | VW | 380000 | 29000 | 2026-11-01 |

## MIN and MAX syntax and arguments

`=MIN(number1, [number2], ...)`

`=MAX(number1, [number2], ...)`

| Argument | Required? | What it does |
|---|---|---|
| number1 | Required | A number, cell or range to search. |
| number2, ... | Optional | More numbers, cells or ranges, up to 255 arguments in all. |

The two functions are mirror images. Because MIN and MAX accept typed numbers as well as ranges, they double as a floor or a cap, which is covered below.

## MIN and MAX examples, from one column to a lookup

### Find the lowest and highest value in a column

In any empty cell enter:

`=MAX(C2:C9)`

It returns 410000, the Ranger. The matching lowest-value formula is:

`=MIN(C2:C9)`

It returns 0, not 150000. The Fiesta's 0 is a real number, so MIN found it. That is correct behavior and a wrong answer to the question you meant. The fix is in the zero-trap section below.

Mileage has no such problem. `=MIN(D2:D9)` returns 29000, the Tiguan, and `=MAX(D2:D9)` returns 110000, the Hilux.

### Compare two or three cells

MIN and MAX do not need a range. Give them cells or numbers separated by commas. The cheaper of the Corolla (C2) and the Tiguan (C9):

`=MIN(C2,C9)`

It returns 185000. Mixing a cell and a typed number is allowed too.

### Use MAX as a floor and MIN as a cap

A typed number turns MAX into "at least" and MIN into "at most". To keep a discount from going below zero:

`=MAX(0,C2-200000)`

The Corolla at 185000 minus 200000 would be negative, so the formula returns 0. Likewise `=MAX(C2:C9,500000)` returns 500000, because the typed number is larger than anything in the list. Floors and caps are the commonest everyday uses of MAX and MIN outside a simple scan of a column.

### Find the earliest and latest date

Dates are numbers, so MIN is the earliest and MAX is the latest. `=MAX(E2:E9)` returns the serial number for 1 November 2026, the Tiguan's listing date, and `=MIN(E2:E9)` returns the serial number for 2 September 2026. If you see 46327 instead of a date, the cell has a General or Number format. Press Ctrl+1 and choose a Date format. The [date functions guide](https://logicexcel.com/functions/date-functions) covers more date arithmetic.

### Range between lowest and highest

Subtract one from the other to get the spread:

`=MAX(C2:C9)-MINIFS(C2:C9,C2:C9,">0")`

It returns 260000, the gap between the Ranger and the Polo. A spread that ignores the unpriced Fiesta is the useful one here.

## MINIFS and MAXIFS: the lowest or highest for a group

MINIFS and MAXIFS add conditions. The syntax is:

`=MINIFS(min_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)`

`=MAXIFS(max_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)`

The range to examine comes first, then pairs of range and test, exactly as in SUMIFS. Every range must be the same size.

Cheapest VW:

`=MINIFS(C2:C9,B2:B9,"VW")`

It returns 150000, the Polo. Cheapest Toyota:

`=MINIFS(C2:C9,B2:B9,"Toyota")`

It returns 165000, the Yaris. The dearest Toyota:

`=MAXIFS(C2:C9,B2:B9,"Toyota")`

That returns 320000, the Hilux. The examined range does not have to be the price. The highest mileage among Fords:

`=MAXIFS(D2:D9,B2:B9,"Ford")`

It returns 64000. Only the Fiesta has 64000; the Ranger has 38000.

If no row passes the tests, MINIFS and MAXIFS return 0, not an error. `=MINIFS(C2:C9,B2:B9,"Honda")` returns 0 because there is no Honda in the list. That 0 looks like a price, so a spelling mistake in the criteria can hide behind it. When a zero would be misleading, check the result with COUNTIF first, or compare against the [COUNTIFS guide](https://logicexcel.com/functions/countifs).

If the ranges are different sizes, you get #VALUE!, for example `=MINIFS(C2:C9,B2:B8,"VW")`. The conditions use the same operators and wildcards as [SUMIF](https://logicexcel.com/functions/sumif).

## How to ignore zeros in MIN

Three ways exist, depending on your Excel version.

1. **MINIFS (Excel 2019 and Microsoft 365).** `=MINIFS(C2:C9,C2:C9,">0")` returns 150000. It is the clearest option.
2. **SMALL with a count of zeros (every version).** `=SMALL(C2:C9,COUNTIF(C2:C9,0)+1)` returns 150000. COUNTIF finds that one price is 0, so SMALL skips to the second smallest value. It needs no array entry. See the [LARGE and SMALL guide](https://logicexcel.com/functions/large-small).
3. **MIN with IF (array formula).** `=MIN(IF(C2:C9>0,C2:C9))` returns 150000. In Microsoft 365 you press Enter. In older versions you press Ctrl+Shift+Enter, and Excel adds curly brackets. See the [array formulas guide](https://logicexcel.com/tutorials/array-formulas).

A fourth, cleaner answer is to stop storing missing values as zero. A blank cell is skipped by MIN automatically.

## Find the name that goes with the lowest or highest value

MIN and MAX return a number, not the row it came from. To get the car's name, find the value with MATCH and return the matching row with INDEX.

The most expensive car:

`=INDEX(A2:A9,MATCH(MAX(C2:C9),C2:C9,0))`

It returns Ranger. MATCH finds the position of 410000 in C2:C9, which is 6, and INDEX returns the sixth item in A2:A9. The last argument 0 in MATCH asks for an exact match.

The cheapest priced car:

`=INDEX(A2:A9,MATCH(MINIFS(C2:C9,C2:C9,">0"),C2:C9,0))`

It returns Polo. If two cars share the lowest price, MATCH returns the first one in the list. For a full explanation of the pair, read the [INDEX MATCH guide](https://logicexcel.com/functions/index-match).

## MIN and MAX compared with other options

| Function | Returns | Example on this data | Best for |
|---|---|---|---|
| `MIN`, `MAX` | Lowest, highest number | `=MAX(C2:C9)` returns 410000 | A whole range |
| `MINIFS`, `MAXIFS` | Lowest, highest that meets conditions | `=MAXIFS(C2:C9,B2:B9,"Toyota")` returns 320000 | Group or filtered results |
| `LARGE`, `SMALL` | The nth highest, nth lowest | `=SMALL(C2:C9,2)` returns 150000 | Second place, top 3 |
| `SUBTOTAL(104, ...)` | Highest of the visible rows | `=SUBTOTAL(104,C2:C9)` returns 410000 | Filtered lists |
| `MAXA`, `MINA` | As MAX and MIN, but text counts as 0 | `=MAXA(B2:B9)` returns 0 | Rare; mixed true/false columns |

Use MIN and MAX first. Move to LARGE and SMALL for second place and top-N lists, and to MINIFS and MAXIFS the moment the question contains "for" or "where". The [SUBTOTAL guide](https://logicexcel.com/functions/subtotal) explains how 104 and 105 respect filters.

## Which Excel versions have these functions

MIN, MAX, LARGE and SMALL work in every version of Excel, in Excel for the web and in Excel for Mac. MINIFS and MAXIFS are newer. They are in Excel 2019 and later, in Microsoft 365, in Excel for the web and in Excel for Mac 2019 and later. They are not in Excel 2016 and earlier versions that were bought as a one-off licence. A file that uses them opens there, but the cells show #NAME?. If you share with people on older versions, use the SMALL or MIN with IF alternatives above.

## MIN and MAX errors and surprises

| What you see | Cause | Fix |
|---|---|---|
| 0 from MIN on a list of prices | A zero (an unpriced item) is in the range | `=MINIFS(C2:C9,C2:C9,">0")` |
| 0 from MAX or MIN on a column of names | The range has no numbers, as in `=MAX(B2:B9)` | Point at the number column |
| #VALUE! | A typed text argument, as in `=MAX("abc")`, or MINIFS ranges of different sizes | Remove the text, or match the range sizes |
| #NAME? | MINIFS or MAXIFS in Excel 2016 or earlier, or a typo | Use an alternative, or check the spelling |
| 0 from MINIFS or MAXIFS | No row met the conditions | Check the criteria spelling |
| A big number instead of a date | The cell has a number format | Apply a Date format with Ctrl+1 |
| Wrong answer from an apparent number | The numbers are stored as text, so they are skipped | Convert them to real numbers |
| #DIV/0! or other errors in the range | An error cell in the range spreads | Fix the cell, or filter errors out |

`=MIN(C2:C9)=0` returns TRUE on the sample data. That one-line test is a good way to find out whether a zero is hiding in a list before you report a minimum.

## What learners get wrong

Between 26 September and 3 November 2026, learners made 4,715 first attempts across our [MIN, MAX, LARGE, SMALL lesson](https://logicexcel.com/practice/19), and 82.9% were right. These counts are first checks of a screen in a page view, not people. The stored wrong answers show a few patterns.

**Using MAX when the question asks for a position.** One screen asks for the second largest value in a list. It had 631 first attempts and 77.0% were right. The accepted answer is `=LARGE(A1:A5,2)`. The commonest wrong formula, 12 times, was `=MAX(A1:A5)`. MAX only knows the top value and has no argument for "second". Seven more left out the position, as in `=LARGE(A1:A5)`, which Excel will not accept. The same confusion appears in the follow-on practice lesson. On the screen that asks for the tenth largest value of coffee production, two first attempts were `=MAX(C:C,10)`. That asks for the biggest of the column and the number 10, which is not what the question means.

**Unfinished or misaimed formulas.** In our [MIN, MAX, LARGE, SMALL practice lesson](https://logicexcel.com/practice/57), 1,713 first attempts were 78.9% right. The screen asking for the highest coffee production, 174 first attempts at 76.4% right, wants the number 3,552,729. Most of the wrong answers there were not formulas at all. Of the two formula-shaped ones, `=max(c:c` (2 first attempts) has no closing bracket and `=max(b:b)` (2 first attempts) points at the wrong column. Finish the formula and press Enter, then read the number the cell shows.

**Typing the formula where a number is wanted.** Several screens ask what a formula would return. The answers are numbers. On the screen asking what `=LARGE(A1:B3,2)` returns, which had 454 first attempts and 71.4% right, 30 first attempts retyped the formula itself instead of the 8 it gives. In Excel itself, the cell shows the result and the bar above it shows the formula. Always read the result.

## A worked job: picking a used car shortlist

A buyer wants the cheapest car under 200000 with the lowest mileage, and wants to know how wide the price spread is. Use the car list above.

1. **Check the list for hidden zeros.** `=MIN(C2:C9)=0` returns TRUE, so the Fiesta needs to be excluded from every price formula.
2. **Find the real cheapest price.** `=MINIFS(C2:C9,C2:C9,">0")` returns 150000.
3. **Narrow to the budget.** The lowest mileage among cars priced above 0 and below 200000 is `=MINIFS(D2:D9,C2:C9,"<200000",C2:C9,">0")`. It returns 72000. The three cars in that band are the Corolla, the Polo and the Yaris.
4. **Name the car.** `=INDEX(A2:A9,MATCH(MINIFS(D2:D9,C2:C9,"<200000",C2:C9,">0"),D2:D9,0))` returns Corolla.
5. **Report the spread.** `=MAX(C2:C9)-MINIFS(C2:C9,C2:C9,">0")` returns 260000.

| Question | Answer |
|---|---|
| Cheapest priced car | Polo (150000) |
| Lowest mileage under 200000 | Corolla (72000 km) |
| Dearest car | Ranger (410000) |
| Price spread | 260000 |

The only unusual step is the first, and it is the one that stops a wrong report from going out.

## Practice MIN and MAX in the browser

The exercise above this article is [Practice Lesson 19](https://logicexcel.com/practice/19). Type the formula yourself and the lesson checks it. Then try [Practice Lesson 57](https://logicexcel.com/practice/57), which uses a larger table and asks for numbers. You can start free on the site, then a pass opens the rest. The [math functions guide](https://logicexcel.com/functions/other-functions) puts these next to ROUND, MOD and ABS.

## FAQ

### How do I find the minimum and maximum value in Excel?

Type `=MIN(C2:C9)` for the smallest and `=MAX(C2:C9)` for the largest, using your own range. Both skip blanks and text. If a missing value is stored as 0, MIN returns 0, so use MINIFS with a greater-than-zero test to skip it.

### How do I use MAXIFS in Excel?

MAXIFS takes the range to examine first, then pairs of range and condition: `=MAXIFS(C2:C9,B2:B9,"Toyota")` returns 320000, the highest Toyota price. Add more pairs to narrow further. MAXIFS needs Excel 2019 or Microsoft 365.

### How do I use MINIFS to ignore zeros?

Test the same range for greater than zero: `=MINIFS(C2:C9,C2:C9,">0")`. On the sample prices it returns 150000 instead of 0. If your Excel has no MINIFS, use `=SMALL(C2:C9,COUNTIF(C2:C9,0)+1)`.

### How do I find the name of the highest value in Excel?

Wrap MAX in MATCH and INDEX: `=INDEX(A2:A9,MATCH(MAX(C2:C9),C2:C9,0))` returns the name from column A beside the highest price in column C. When two rows tie, you get the first one in the list.

### What is the difference between MAX and LARGE?

MAX always returns the single highest value. LARGE returns the nth highest, so `=LARGE(C2:C9,2)` is the second highest. `=LARGE(C2:C9,1)` is the same as MAX. Use LARGE for podium places and top-N lists.

### Why does MAX return 0 in Excel?

The range has no real numbers, either because the cells hold text or because the numbers are stored as text. Check that the cells are right-aligned numbers, and convert text numbers with Text to Columns. MAX never shows an error for an empty or text range, which hides the problem.

### Can MIN and MAX work with dates and times?

Yes, because both are numbers. MIN returns the earliest and MAX the latest. If the result shows as a large number such as 46327, format the cell as a date or a time with Ctrl+1.

## Sources

- [MIN function, Microsoft Support](https://support.microsoft.com/en-us/excel/functions/min-function)
- [MAX function, Microsoft Support](https://support.microsoft.com/en-us/excel/functions/max-function)
- [MINIFS function, Microsoft Support](https://support.microsoft.com/en-us/excel/functions/minifs-function)
