Skip to main content
ExcelMINIFS & MAXIFSStatisticalData AnalysisCriteria Functions

The Problem

Have you ever stared at a vast spreadsheet, needing to pinpoint the smallest or largest value, but with a nagging condition? Perhaps you need the lowest sales figure, but only for "Product X" sold in the "East" region, and only by "Salesperson Jane." Or maybe you're tracking project costs and need the highest expenditure recorded for "Phase 3" within a specific "Budget Category." Manually sifting through rows and applying filters only to then sort and pick out the extremes is incredibly time-consuming and prone to human error. This frustration is a common bottleneck in data analysis.

What is MINIFS & MAXIFS? MINIFS is an Excel function that calculates the minimum value among cells specified by a given set of conditions or criteria. Similarly, MAXIFS calculates the maximum value. Both functions are commonly used to extract highly specific extreme values from large datasets, moving beyond simple MIN and MAX functions.

The traditional MIN and MAX functions are powerful for finding overall extremes, but they fall short when you introduce specific conditions. Imagine trying to find the minimum order quantity for a particular product from a specific supplier. Filtering and sorting might get you there, but it's not dynamic, and certainly not scalable if your criteria change frequently. That's exactly where the precision of MINIFS and MAXIFS becomes indispensable, allowing you to slice your data with unparalleled accuracy.

Business Context & Real-World Use Case

In today's data-driven business environment, the ability to quickly extract precise insights is paramount. Consider a retail company analyzing its vast sales database. A sales manager might need to identify the minimum discount offered on a high-value item during a promotional period, or conversely, the maximum sales value achieved by a new product line in a specific geographic territory. Doing this manually, by applying multiple filters, scrolling, and visually inspecting data, is not just inefficient; it introduces a significant risk of error and delays critical decision-making.

In my years as a data analyst, I've seen teams waste countless hours on tasks that MINIFS and MAXIFS could automate in seconds. For instance, in supply chain management, tracking vendor performance often requires finding the lowest delivery time for critical components from a preferred supplier. Or, in financial analysis, identifying the maximum expense incurred by a specific department on a particular project. Attempting these tasks with basic functions or manual filtering can lead to overlooked trends, inaccurate reports, and missed opportunities.

Automating this process with MINIFS and MAXIFS provides immense business value. It enables rapid, accurate reporting, allowing managers to quickly assess performance, identify outliers, and make informed strategic decisions. Instead of spending hours gathering data, employees can focus on analyzing the results and formulating actionable insights. This agility can translate directly into cost savings, improved operational efficiency, and a competitive edge. Experienced Excel users prefer these functions for their robust capability to handle complex conditional calculations, ensuring data integrity and expediting crucial analyses.

The Ingredients: Understanding MINIFS & MAXIFS's Setup

Before we start cooking up our solutions, let's gather our "ingredients" – the parameters that make up the MINIFS and MAXIFS functions. Both functions share a very similar structure, differing only in the aggregate they calculate (minimum vs. maximum).

The exact syntax for these functions is straightforward:
=MINIFS(min_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
=MAXIFS(max_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)

Let's break down each parameter:

Parameter Requirements Description
min_range Must contain numeric values or be convertible to numbers. This is the range of cells from which the minimum value will be determined. Excel will ignore blank cells and text values within this range when calculating. For MAXIFS, this parameter is max_range.
criteria_range1 Must be a range of cells. It must have the same number of rows and columns as min_range (or max_range) for implicit intersection to work correctly. This is the range of cells where the first condition will be evaluated. It must correspond logically to your min_range.
criteria1 Can be a number, expression, cell reference, or text string. This is the specific condition that criteria_range1 must meet. Examples include 10, ">50", A1, "North", or "=Product A". Text criteria must be enclosed in double quotes.
criteria_range2 Optional. Must be a range of cells. Same dimension requirements as criteria_range1. This is the second range where the second condition will be evaluated. You can add up to 127 pairs of criteria_range and criteria arguments, allowing for highly specific filtering.
criteria2 Optional. Can be a number, expression, cell reference, or text string. This is the specific condition that criteria_range2 must meet. Similar rules apply as for criteria1. Each additional criteria_range/criteria pair further refines your search, ensuring the MINIFS or MAXIFS function returns a truly specific value based on all provided conditions.

Understanding these components is crucial. Each criteria_range acts as a filter on your min_range or max_range, ensuring that only values meeting all specified conditions are considered in the final calculation. This multi-conditional capability is what sets MINIFS and MAXIFS apart from simpler statistical functions.

The Recipe: Step-by-Step Instructions

Let's put our knowledge to the test with a practical sales data scenario. Imagine you're analyzing sales transactions for an electronics retailer, and you need to find specific extreme values.

Here's our sample sales data:

Order ID Product Region Salesperson Quantity Revenue ($)
1001 Laptop North Alice 2 2400
1002 Monitor South Bob 3 750
1003 Mouse East Charlie 10 250
1004 Keyboard West Alice 5 300
1005 Laptop North David 1 1200
1006 Monitor South Bob 2 500
1007 Mouse East Charlie 7 175
1008 Keyboard West David 8 480
1009 Laptop North Alice 3 3600
1010 Monitor East Charlie 4 1000
1011 Keyboard South Bob 6 360
1012 Mouse West Alice 12 300

Let's find the minimum Revenue for 'Laptop' in the 'North' region and the maximum Quantity sold by 'Alice' in the 'West' region.

For MINIFS: Minimum Revenue for 'Laptop' in 'North' Region

  1. Select Your Cell: Click on cell G2 where you want the MINIFS result to appear.
  2. Start the Formula: Type =MINIFS(.
  3. Specify the min_range: Our revenue data is in column F. So, select F2:F13 or type F2:F13. Your formula now looks like: =MINIFS(F2:F13,.
  4. Add First Criteria Pair (Product):
    • criteria_range1: Our product names are in column B. Select B2:B13 or type B2:B13.
    • criteria1: We are looking for 'Laptop'. Type "Laptop".
    • Your formula is now: =MINIFS(F2:F13, B2:B13, "Laptop",.
  5. Add Second Criteria Pair (Region):
    • criteria_range2: Our region data is in column C. Select C2:C13 or type C2:C13.
    • criteria2: We are looking for 'North'. Type "North".
    • Your formula is now: =MINIFS(F2:F13, B2:B13, "Laptop", C2:C13, "North").
  6. Close the Parenthesis and Execute: Press Enter.

The final MINIFS formula is:
=MINIFS(F2:F13, B2:B13, "Laptop", C2:C13, "North")

Result: Excel will return 1200.
Explanation: MINIFS scanned the F2:F13 range. It only considered rows where 'Product' was 'Laptop' (B2:B13) AND 'Region' was 'North' (C2:C13). The relevant rows are Order IDs 1001 (Laptop, North, Revenue 2400) and 1005 (Laptop, North, Revenue 1200) and 1009 (Laptop, North, Revenue 3600). The minimum among these is 1200.

For MAXIFS: Maximum Quantity for 'Alice' in 'West' Region

  1. Select Your Cell: Click on cell G3 for the MAXIFS result.
  2. Start the Formula: Type =MAXIFS(.
  3. Specify the max_range: Our quantity data is in column E. Select E2:E13 or type E2:E13. Your formula: =MAXIFS(E2:E13,.
  4. Add First Criteria Pair (Salesperson):
    • criteria_range1: Salesperson names are in column D. Select D2:D13 or type D2:D13.
    • criteria1: We need 'Alice'. Type "Alice".
    • Your formula: =MAXIFS(E2:E13, D2:D13, "Alice",.
  5. Add Second Criteria Pair (Region):
    • criteria_range2: Region data is in column C. Select C2:C13 or type C2:C13.
    • criteria2: We need 'West'. Type "West".
    • Your formula: =MAXIFS(E2:E13, D2:D13, "Alice", C2:C13, "West").
  6. Close the Parenthesis and Execute: Press Enter.

The final MAXIFS formula is:
=MAXIFS(E2:E13, D2:D13, "Alice", C2:C13, "West")

Result: Excel will return 12.
Explanation: MAXIFS looked at the E2:E13 range (Quantity). It only considered rows where 'Salesperson' was 'Alice' (D2:D13) AND 'Region' was 'West' (C2:C13). The relevant rows are Order IDs 1004 (Keyboard, West, Alice, Quantity 5) and 1012 (Mouse, West, Alice, Quantity 12). The maximum among these is 12.

These step-by-step instructions demonstrate the power of MINIFS and MAXIFS in isolating precise extreme values from complex datasets with ease.

Pro Tips: Level Up Your Skills

Mastering MINIFS and MAXIFS goes beyond basic application; a few expert insights can significantly enhance your efficiency and the robustness of your spreadsheets. Always remember to evaluate data thoroughly before deployment. This best practice ensures that your ranges are correctly formatted and that no unexpected text values or errors will skew your results.

Here are some additional expert tips:

  • Dynamic Criteria with Cell References: Instead of hardcoding criteria like "Laptop" or "North", reference a cell containing the desired criterion. For example, if "Laptop" is in cell H1 and "North" is in I1, your MINIFS formula could be =MINIFS(F2:F13, B2:B13, H1, C2:C13, I1). This makes your formulas much more flexible and easier to update without editing the formula itself.
  • Using Wildcards for Partial Matches: MINIFS and MAXIFS support wildcards (*, ?) for text criteria. For instance, to find the minimum for any product starting with "L", you could use "L*" as your criterion. "?" matches any single character. This is invaluable for fuzzy matching where exact text may vary slightly but a pattern exists.
  • Handling Date Criteria: For date ranges, use comparison operators within double quotes, referencing a cell. For example, to find the MINIFS value after a certain date in cell H1, use ">"&H1 as your criterion. This concatenates the operator with the date value, creating a valid date criterion.

These professional tips will help you leverage MINIFS and MAXIFS in more sophisticated ways, transforming static reports into dynamic analytical tools.

Troubleshooting: Common Errors & Fixes

Even the most seasoned Excel users encounter occasional hiccups. When MINIFS or MAXIFS doesn't return the expected result, it's usually due to a few common culprits. A common mistake we've seen is related to formula syntax typos, but other issues can also arise.

1. #VALUE! Error

  • What it looks like: The cell displays #VALUE!
  • Why it happens: This error typically occurs if one of the criteria_range arguments does not have the same dimensions (number of rows and columns) as the min_range or max_range. Another less common cause is attempting to perform an arithmetic operation on a non-numeric value within the formula, although for MINIFS/MAXIFS, dimension mismatch is the primary reason.
  • How to fix it:
    1. Check Range Dimensions: Carefully inspect all your min_range/max_range and criteria_range arguments. Ensure they all cover the same number of rows (or columns, if your data is arranged horizontally). For example, if min_range is F2:F100, then criteria_range1 must also cover 99 rows, such as B2:B100.
    2. Verify Data Type (Less Common): While MINIFS/MAXIFS generally ignore text in the aggregate range, ensure that the cells being evaluated in min_range/max_range are indeed numbers or dates. If you find text that looks like numbers, convert them using "Text to Columns" or VALUE() function.

2. #NAME? Error

  • What it looks like: The cell displays #NAME?
  • Why it happens: This is almost always a classic formula syntax typo. It means Excel doesn't recognize the function name you've typed. Perhaps you typed MINIF instead of MINIFS, or MAXIF instead of MAXIFS. This can also happen if you are using an older version of Excel (pre-Excel 2019 or Excel for Microsoft 365) where MINIFS and MAXIFS were not available.
  • How to fix it:
    1. Check Function Spelling: Double-check the spelling of the function. Ensure it is MINIFS and MAXIFS with the 'S' at the end.
    2. Verify Excel Version: Confirm that your version of Excel supports these functions. If you are on an older version, you might need to use array formulas with MIN(IF(...)) or MAX(IF(...)) which are more complex, or consider upgrading.

3. Incorrect or Unexpected Result (e.g., 0, #DIV/0!, or a value that doesn't seem right)

  • What it looks like: The formula executes without an error, but the result is 0, #DIV/0!, or a value that is clearly not what you expected.
  • Why it happens: This is frequently caused by a mismatch between your criteria and the actual data, often due to hidden characters, case sensitivity, or a logical flaw in the criteria.
    • Trailing/Leading Spaces: Extra spaces in your criteria (e.g., "Laptop " instead of "Laptop") or in your data cells.
    • Case Sensitivity: While MINIFS and MAXIFS are generally case-insensitive for text criteria, some comparisons can become problematic.
    • Numbers as Text: Numeric values in your criteria_range might be stored as text, preventing a match with numeric criteria.
    • Incorrect Operators: Using > when you meant >= or similar operator mistakes.
    • No Match Found: If no cells meet all specified criteria, MINIFS will return 0 (which can be misleading if 0 is a valid minimum) and MAXIFS will also return 0 if all potential max_range values are negative, or the smallest positive number if the max_range contains only positive numbers but no match is found. If the min_range/max_range contains only text/blanks, MINIFS/MAXIFS will return 0.
  • How to fix it:
    1. Trim Spaces: Use the TRIM() function on your criteria or clean your data by using TRIM() on the criteria_range columns themselves. For example, if your criterion is in cell H1, use TRIM(H1).
    2. Check Data Type Consistency: Ensure that your numeric criteria are comparing against numbers, and text against text. If numbers are stored as text, select the column, go to "Data" tab, then "Text to Columns," and click "Finish" to convert them.
    3. Review Criteria Logic: Re-read your criteria. Are you absolutely certain that the values you're asking for exist in the specified ranges and meet the exact conditions? Filter your data manually with the same criteria to confirm what the expected output should be.
    4. Wildcard Mismatches: If using wildcards, ensure they are correctly placed (e.g., "*laptop*" for "contains laptop").
    5. Address "No Match Found": If a 0 result is misleading, wrap your MINIFS/MAXIFS in an IFERROR or IF statement. For instance, =IF(MINIFS(...) = 0, "No Match", MINIFS(...)) to differentiate between a true zero value and no matching data.

By systematically going through these troubleshooting steps, you can swiftly diagnose and rectify issues, ensuring your MINIFS and MAXIFS formulas deliver accurate, reliable results.

Quick Reference

Here's a concise summary of the MINIFS and MAXIFS functions:

  • Syntax:
    • =MINIFS(min_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
    • =MAXIFS(max_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
  • Purpose: To find the minimum or maximum value from a range of cells that meet one or more specified criteria.
  • Most Common Use Case: Filtering large datasets to identify extreme values (lowest cost, highest sale, shortest duration) based on multiple conditions, such as product type, region, date range, or department.
  • Key Feature: Enables multi-conditional aggregation, a significant upgrade from basic MIN/MAX functions.

Related Functions

👨‍💻

Written by The Head Chef

Former 10-year Financial Analyst who survived countless month-end closes. I build these recipes to save you from weekend-ruining spreadsheet errors.

Read the full story →

You might also find these useful 💡