Home Topics excel MAXIFS function in Excel – find max value with multiple criteria

MAXIFS function in Excel – find max value with multiple criteria

Apr 03, 2025 am 09:16 AM

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)

MAXIFS function in Excel – find max value with multiple criteria

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)

MAXIFS function in Excel – find max value with multiple criteria

For reusable formulas, use absolute references (e.g., $D$2:$D$11).

MAXIFS function in Excel – find max value with multiple criteria

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))

MAXIFS function in Excel – find max value with multiple criteria

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, "

MAXIFS function in Excel – find max value with multiple criteria

To exclude volleyball:

=MAXIFS(D2:D11, B2:B11, "volleyball") or using cell reference G1: =MAXIFS(D2:D11, B2:B11, ""&G1)

MAXIFS function in Excel – find max value with multiple criteria

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)

MAXIFS function in Excel – find max value with multiple criteria

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, "

MAXIFS function in Excel – find max value with multiple criteria

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))

MAXIFS function in Excel – find max value with multiple criteria

Key Considerations for Excel MAXIFS:

  1. Handles one or multiple criteria.
  2. Uses AND logic by default.
  3. max_range and criteria_range must be the same size and shape.
  4. Case-insensitive for text criteria.
  5. Use absolute references when copying formulas.
  6. Correct criteria syntax is crucial (use quotes appropriately).
  7. 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!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Excel formula to find top 3, 5, 10 values in column or row Excel formula to find top 3, 5, 10 values in column or row Apr 01, 2025 am 05:09 AM

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

Add a dropdown list to Outlook email template Add a dropdown list to Outlook email template Apr 01, 2025 am 05:13 AM

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

How to use Flash Fill in Excel with examples How to use Flash Fill in Excel with examples Apr 05, 2025 am 09:15 AM

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

Regex to extract strings in Excel (one or all matches) Regex to extract strings in Excel (one or all matches) Mar 28, 2025 pm 12:19 PM

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

How to add calendar to Outlook: shared, Internet calendar, iCal file How to add calendar to Outlook: shared, Internet calendar, iCal file Apr 03, 2025 am 09:06 AM

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

FV function in Excel to calculate future value FV function in Excel to calculate future value Apr 01, 2025 am 04:57 AM

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

MEDIAN formula in Excel - practical examples MEDIAN formula in Excel - practical examples Apr 11, 2025 pm 12:08 PM

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

How to remove / split text and numbers in Excel cell How to remove / split text and numbers in Excel cell Apr 01, 2025 am 05:07 AM

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

See all articles