|
Home > Formulas > Statistical > MINIFS MAXIFS Excel MINIFS and MAXIFS Functions
|

Instead of finding the overall MIN or MAX, you might need to include criteria in your calculations. For example:
In Excel 2019 and later, or Excel for Office 365:
For earlier versions of Excel:
Use the MINIFS function to find the smallest value, based on one or more criteria.
MINIFS has 3 required arguments in its syntax:

For example, this formula (for Excel 365) finds the minimum quantity for the product name in cell B6.
There's a spill formula in cell B4 to create a unique list of products. The MINIFS formula has a spill operator (#) at the end of that cell reference -- B4# -- so the MINIFS results spill down too.
Excel 2019: Spill formulas are not available in Excel 2019. In that version, refer to cell B4, without the spill operator, and copy the formula down manually.

To use two or more criteria with MINIFS, use the optional arguments for additional criteria ranges and criteria.
MINIFS has optional pairs of arguments in its syntax, for criteria ranges and criteria:
For example, this formula (for Excel 365) finds the minimum quantity for the customer selected in cell C3, and the product name in cell B6.
There's a spill formula in cell B6 to create a unique list of products. The MINIFS formula refers to that cell with the spill operator -- B6# -- so the MINIFS results spill down too.
Excel 2019: Spill formulas are not available in Excel 2019. In that version, refer to cell B6, without the spill operator, and copy the formula down manually.

In Excel 2019, or Excel for Office 365, you can use the MAXIFS function to find a maximum value, based on one or more criteria. For earlier versions of Excel, use the MAX IF With Multiple Criteria formula shown below.
MAXIFS has 3 required arguments in its syntax:

MAXIFS has optional pairs of arguments in its syntax, for criteria ranges and criteria:
For example, this formula (for Excel 365) finds the maximum quantity for the product name in cell B6.
There's a spill formula in cell B6 to create a unique list of products. The MAXIFS formula has a spill operator (#) at the end of that cell reference -- B4# -- so the MAXIFS results spill down too.
Excel 2019: Spill formulas are not available in Excel 2019. In that version, refer to cell B4, without the spill operator, and copy the formula down manually.

To use two or more criteria with MAXIFS, use the optional arguments for additional criteria ranges and criteria.
For example, this formula (for Excel 365) finds the maximum quantity for the customer selected in cell C3, and the product name in cell B6.
There's a spill formula in cell B6 to create a unique list of products. The MAXIFS formula refers to that cell with the spill operator -- B6# -- so the MAXIFS results spill down too.
Excel 2019: Spill formulas are not available in Excel 2019. In that version, refer to cell B6, without the spill operator, and copy the formula down manually.

If you have a list of product prices and dates, you can use a MAXIFS formula to find the latest pricing date for a specific product:
Then, use SUMIFS to get the price for that product, on that date.
In Excel 2019, or Excel for Office 365, you can use this MAXIFS formula, to find the latest price.
In this example, there is a price table with product, customer, date and price.

You could use two formulas in the solution - one to find the latest price, and one to find the price for that date.
This formula in C4 returns the latest date for the selected product and customer:
Next, this formula in cell D4 returns the price for that date, and the selected product and customer:
Or, use this all-in-one formula, in cell D6, to find the price for the latest date:

Don't miss my monthly Excel newsletter! You'll get quick tips, article links, and a bit of fun. Add your email, and click Sign Up.
Next, when you get my reply, click the Confirm button. I add this step to protect you from spam!
Last updated: February 27, 2026 3:55 PM