MAXIFS function in Excel – find max value with multiple criteria
This tutorial demonstrates how to use Excel's MAXIFS function to efficiently find the maximum value based on specified conditions. Before MAXIFS, users relied on complex MAX IF array formulas. This new function simplifies this process significantly.
Excel MAXIFS Function: Syntax and Basic Usage
The MAXIFS function identifies the largest numeric value within a range, subject to one or more criteria. Its syntax is:
MAXIFS(max_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
Where:
- max_range: The cell range containing the values from which to find the maximum.
-
criteria_range1: The first range to evaluate against
criteria1
. -
criteria1: The condition applied to
criteria_range1
. This can be a number, text, or expression. - criteria_range2, criteria2,...: (Optional) Additional ranges and their corresponding criteria. Up to 126 pairs are supported.
MAXIFS is available in Excel 2019, Excel 2021, and Microsoft 365 (Windows and Mac).
For example, to find the tallest football player (heights in D2:D11, sports in B2:B11):
=MAXIFS(D2:D11, B2:B11, "football")
For greater flexibility, specify the sport in a cell (e.g., G1):
=MAXIFS(D2:D11, B2:B11, G1)
Important: max_range
and criteria_range
must be the same size and shape; otherwise, a #VALUE! error results.
Excel MAXIFS: Formula Examples
MAXIFS is straightforward but has nuances. The following examples illustrate its capabilities:
1. Multiple Criteria:
To find the tallest junior basketball player:
-
max_range
: Heights (D2:D11) -
criteria_range1
: Sports (B2:B11) -
criteria1
: "basketball" (or cell G1) -
criteria_range2
: School type (C2:C11) -
criteria2
: "junior" (or cell G2)
Formula (hardcoded criteria):
=MAXIFS(D2:D11, B2:B11, "basketball", C2:C11, "junior")
Formula (using cell references):
=MAXIFS(D2:D11, B2:B11, G1, C2:C11, G2)
For reusable formulas, use absolute references (e.g., $D$2:$D$11
).
To find the name of the tallest player, combine MAXIFS with INDEX and MATCH:
=INDEX($A$2:$A$11, MATCH(MAXIFS($D$2:$D$11, $B$2:$B$11, G1, $C$2:$C$11, G2), $D$2:$D$11, 0))
2. Logical Operators:
Use logical operators (>, =, ) for numeric criteria. Enclose operators and numbers in quotes (">=14"). For cell references, concatenate (e.g., ">"&G1).
To find the max height for boys aged 13-14 (age in column C):
=MAXIFS(D2:D11, C2:C11, ">=13", C2:C11, " or using cell references G1 and H1: <code>=MAXIFS(D2:D11, C2:C11, ">="&G1, C2:C11, "
To exclude volleyball:
=MAXIFS(D2:D11, B2:B11, "volleyball")
or using cell reference G1: =MAXIFS(D2:D11, B2:B11, ""&G1)
3. Wildcard Characters:
Use ?
(any single character) and *
(any sequence) for partial matches.
To find the tallest player in games ending in "ball":
=MAXIFS(D2:D11, B2:B11, "*ball")
or using cell reference G1: =MAXIFS(D2:D11, B2:B11, "*"&G1)
4. Date Ranges:
Dates are serial numbers. Use date formats Excel understands (e.g., "1-Jan-2004", "1/1/2004", or the DATE function).
To find the max height for those born in 2004 (birth date in column C):
=MAXIFS(D2:D11, C2:C11, ">="&DATE(2004,1,1), C2:C11, " or using cell reference G1: <code>=MAXIFS(D2:D11, C2:C11, ">="&DATE(G1,1,1), C2:C11, "
5. OR Logic with Multiple Criteria:
MAXIFS uses AND logic. For OR logic, use nested MAXIFS functions with MAX:
=MAX(MAXIFS(D2:D11, B2:B11, "basketball"), MAXIFS(D2:D11, B2:B11, "football"))
or using cell references F1 and H1: =MAX(MAXIFS(D2:D11, B2:B11, F1), MAXIFS(D2:D11, B2:B11, H1))
Key Considerations for Excel MAXIFS:
- Handles one or multiple criteria.
- Uses AND logic by default.
-
max_range
andcriteria_range
must be the same size and shape. - Case-insensitive for text criteria.
- Use absolute references when copying formulas.
- Correct criteria syntax is crucial (use quotes appropriately).
- Available in Excel 2019 and later.
This comprehensive guide empowers you to leverage the power of the MAXIFS function for efficient data analysis in Excel.
The above is the detailed content of MAXIFS function in Excel – find max value with multiple criteria. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

This tutorial demonstrates how to efficiently locate the top N values within a dataset and retrieve associated data using Excel formulas. Whether you need the highest, lowest, or those meeting specific criteria, this guide provides solutions. Findi

This tutorial shows you how to add dropdown lists to your Outlook email templates, including multiple selections and database population. While Outlook doesn't directly support dropdowns, this guide provides creative workarounds. Email templates sav

This tutorial provides a comprehensive guide to Excel's Flash Fill feature, a powerful tool for automating data entry tasks. It covers various aspects, from its definition and location to advanced usage and troubleshooting. Understanding Excel's Fla

In this tutorial, you'll learn how to use regular expressions in Excel to find and extract substrings matching a given pattern. Microsoft Excel provides a number of functions to extract text from cells. Those functions can cope with most

This article explains how to access and utilize shared calendars within the Outlook desktop application, including importing iCalendar files. Previously, we covered sharing your Outlook calendar. Now, let's explore how to view calendars shared with

This tutorial explains how to use Excel's FV function to determine the future value of investments, encompassing both regular payments and lump-sum deposits. Effective financial planning hinges on understanding investment growth, and this guide prov

This tutorial explains how to calculate the median of numerical data in Excel using the MEDIAN function. The median, a key measure of central tendency, identifies the middle value in a dataset, offering a more robust representation of central tenden

This tutorial demonstrates several methods for separating text and numbers within Excel cells, utilizing both built-in functions and custom VBA functions. You'll learn how to extract numbers while removing text, isolate text while discarding numbers
