MaxIFS in Google Sheets: A Practical Guide

Learn how to use MAXIFS in Google Sheets to find the largest value with multiple criteria. Step-by-step syntax, practical examples, and best practices for power users.

How To Sheets
How To Sheets Team
·5 min read
Quick AnswerFact

MAXIFS in Google Sheets returns the largest value in a range that meets one or more criteria. It simplifies conditional max calculations without array formulas. Syntax: MAXIFS(max_range, criteria_range1, criterion1, [criteria_range2, criterion2], ...). Example: =MAXIFS(B2:B100, A2:A100, "Sales", C:C, ">0"). MAXIFS can handle multiple criteria simultaneously, such as filtering by product, region, or date, and it evaluates all conditions before selecting the maximum in max_range. It returns a numeric result and ignores non-numeric cells within the max_range.

What MAXIFS does in Google Sheets

MAXIFS is a core function for conditional maximums. It returns the highest value in max_range that satisfies all supplied criteria. This is particularly useful for scenarios like finding the top revenue figure for a specific product in a given region and time frame. Unlike a plain MAX plus a separate filter, MAXIFS evaluates all criteria in one pass, which makes formulas cleaner and faster on larger datasets. In Google Sheets, you can combine multiple criteria ranges to model complex rules and still obtain a single numeric result. When used correctly, MAXIFS reduces the need for helper columns and array formulas.

Excel Formula
=MAXIFS(B2:B100, A2:A100, "Widget A")
Excel Formula
=MAXIFS(Sales!C2:C100, Sales!A2:A100, "Widget A", Sales!B2:B100, "West")
  • The first example returns the maximum value from column B where column A equals "Widget A".
  • The second example adds a second condition across different ranges, returning the max Revenue for Widget A in the West region.

Syntax and parameters

MAXIFS(max_range, criteria_range1, criterion1, [criteria_range2, criterion2], ...)

  • max_range: The range with numeric values you want to maximize.
  • criteria_range1, criteria_range2, ...: Ranges that align with max_range; each is tested against the corresponding criterion.
  • criterion1, criterion2, ...: Conditions such as text strings, numbers, operators, or wildcards (e.g., ">100", "Widget*", "North").
Excel Formula
=MAXIFS(D2:D100, A2:A100, "WidgetA", B2:B100, ">2025-01-01")
Excel Formula
=MAXIFS(SalesAmount, Product, "WidgetA", Region, "North")

Tips:

  • All ranges must be the same size. Mismatched lengths yield an error.
  • Criteria can combine exact matches, inequalities, and text patterns.

Real-world scenario: dataset example

Consider a small dataset where A2:A5 contains Product, B2:B5 Region, C2:C5 Month, and D2:D5 Revenue. We want the maximum Revenue for WidgetA in the North region.

Excel Formula
Product Region Month Revenue WidgetA North 2025-01 12000 WidgetB South 2025-01 15000 WidgetA North 2025-02 18000 WidgetC East 2025-02 9000
Excel Formula
=MAXIFS(D2:D5, A2:A5, "WidgetA", B2:B5, "North")

Interpretation:

  • max_range is D2:D5 (Revenue).
  • First criterion selects WidgetA in A2:A5.
  • Second criterion selects North in B2:B5.
  • Result is the maximum Revenue among the matching rows.

Common pitfalls and fixes

Common issues

  • Mismatched range lengths: max_range must align with every criteria_range. If A2:A100 has 99 entries, D2:D100 must have 99 entries as well.
  • Non-numeric data in max_range: MAXIFS ignores non-numeric values, but ensuring numeric data improves reliability.
  • Empty results: If no rows match, MAXIFS can return 0 depending on data; test with a controlled example to confirm behavior in your sheet.

Fixes

  • Use named ranges for readability and to keep ranges aligned when data expands.
  • Validate inputs with a quick check formula like =COUNTA(A2:A100) = ROWS(D2:D100).
Excel Formula
=MAXIFS(D2:D100, A2:A100, "WidgetA");
Excel Formula
=MAXIFS(D2:D100, A2:A100, "WidgetA", B2:B100, "North")

Alternatives and advanced patterns

If you need OR-like behavior (either of multiple criteria), MAXIFS alone cannot express OR; combine with FILTER or use a nested approach.

Excel Formula
=MAX(FILTER(D2:D100, (A2:A100="WidgetA") * (B2:B100="North")))

This uses FILTER to apply multiple criteria then MAX to pick the highest value from the filtered results. Another option is a dynamic array approach with SUMPRODUCT-like logic for more complex cases, but FILTER+MAX is typically simplest and fastest in Sheets.

Excel Formula
=MAX(IF((A2:A100="WidgetA")*(B2:B100="North"), D2:D100))

Note: The latter relies on implicit array behavior in Sheets.

Performance tips and best practices

  • Use named ranges for max_range and criteria_ranges to simplify maintenance as your data grows.
  • Prefer MAXIFS over composing MAX with FILTER for performance on large datasets, as MAXIFS is optimized for conditional maxima.
  • When working with dates, ensure criteria are date literals or proper date values to avoid text comparison issues.
  • Cache frequent combinations by creating a small reference table and referencing it in MAXIFS rather than repeating heavy calculations in many cells.
Excel Formula
=MAXIFS(SalesRevenue, Product, "WidgetA", Region, "North")
Excel Formula
=MAXIFS(Revenue, Product, "WidgetA", Region, "West", Date, ">=DATE(2025,1,1)")

Steps

Estimated time: 15-25 minutes

  1. 1

    Prepare your data

    Organize your data into clear columns for max_range and each criteria range. Ensure numeric data is in the max_range and that each criteria column aligns in length with the max_range.

    Tip: Use named ranges to simplify formulas and reduce misalignment.
  2. 2

    Write the basic MAXIFS formula

    Start with a single criterion to validate the range and structure. Place the max_range first, followed by criteria_range and criterion.

    Tip: Double-check that all ranges have the same number of rows.
  3. 3

    Add additional criteria as needed

    Extend the formula with more (criteria_range, criterion) pairs to refine your result. Remember: all criteria must be satisfied.

    Tip: Use wildcards for text patterns when appropriate.
  4. 4

    Test with edge cases

    Test scenarios with no matches and with large datasets to confirm behavior and performance.

    Tip: Compare with FILTER+MAX for cross-validation.
  5. 5

    Document and optimize

    Comment formulas or create a small reference table to document frequent MAXIFS patterns. Consider named ranges for readability.

    Tip: Cache common criteria in a lookup table to reduce formula complexity.
Pro Tip: Use named ranges (e.g., Revenue, Product) to keep MAXIFS formulas readable and maintainable.
Warning: All ranges must be the same length; mismatches cause errors.
Note: MAXIFS ignores text in numeric columns but preserves numeric results when present.
Pro Tip: Combine MAXIFS with FILTER to simulate OR-like logic across multiple criteria.

Prerequisites

Required

Optional

  • Optional: Named ranges for readability (e.g., Revenue, Product, Region)
    Optional
  • Practice dataset or sample file to experiment
    Optional

Keyboard Shortcuts

ActionShortcut
Copy formulaCopy the selected formula or cell contentCtrl+C
Paste formulaInsert the copied content into a cellCtrl+V
Auto-fill downFill the formula down the selected columnCtrl+D
Open formula editorEdit the formula in the active cellF2
Find and replaceSearch and replace within the sheetCtrl+H
Enter final valueApply the formula and move to the next cell

FAQ

What is MAXIFS in Google Sheets?

MAXIFS returns the maximum value in a numeric range that meets all specified criteria ranges. It supports multiple criteria in a single, readable formula and is ideal for conditional maxima.

MAXIFS finds the largest value that satisfies all your criteria in Google Sheets.

Can MAXIFS handle multiple criteria at once?

Yes. You can add multiple criteria ranges and corresponding conditions. All conditions must be true for a row to be included in the max calculation.

Yes, MAXIFS supports multiple conditions at the same time.

Does MAXIFS support wildcards in criteria?

MAXIFS accepts textual criteria with wildcards like * and ? to match patterns. Use quotes around the pattern (e.g., "Widget*").

Yes, you can use wildcards in text criteria.

What happens if no rows match the criteria?

If no rows meet all criteria, MAXIFS typically returns 0 in Google Sheets. Test edge cases to confirm behavior in your sheet.

If nothing matches, MAXIFS usually returns zero.

How can I handle complex conditions efficiently on large data?

Use named ranges, minimize cross-sheet references, and consider combining MAXIFS with FILTER for complex logic. For very large datasets, validate performance with sample data first.

For big datasets, optimize with named ranges and consider FILTER combinations.

The Essentials

  • Use MAXIFS for multi-criteria maximums
  • Keep all ranges aligned in length and type
  • Leverage FILTER+MAX for complex OR scenarios
  • Validate edge cases with test data

Related Articles