How MAX works in Excel? Best MAX examples

How MAX works in Excel? Best MAX examples

When working with Excel, finding the maximum value in a dataset is a common task. Whether you’re analyzing sales figures, temperatures, or exam scores, knowing the highest value is essential. That’s where the MAX function comes in handy.

What is the MAX Function in Excel?

The MAX function in Excel is a built-in function that returns the largest number from a set of values. It ignores text and logical values unless they are included directly in the function.

Basic Syntax of MAX

The syntax for MAX is straightforward:

=MAX(number1, [number2], ...)

Where:

  • number1 – Required. The first number, range, or reference containing numbers.
  • number2, … – Optional. Additional numbers or ranges.

Simple Example: Finding the Maximum Value

Suppose we have the following dataset:

Product Sales
Product A 150
Product B 200
Product C 175

To determine the highest sales value, we use:

=MAX(B2:B4)

The result will be 200, the highest value in the Sales column.

Using MAX with Multiple Ranges

You can use MAX to find the highest value across different ranges:

=MAX(A1:A10, C1:C10)

This formula checks both ranges and returns the highest number found.

Ignoring Errors with MAX

If your dataset contains errors like #N/A, #VALUE!, or #DIV/0!, the MAX function may return an error. To handle this, you can use AGGREGATE:

=AGGREGATE(4, 6, A1:A10)

This formula finds the maximum value while ignoring any errors.

Using MAX with Conditions

Excel’s MAX function does not support conditions directly. However, you can combine it with IF or MAXIFS to filter data before finding the maximum.

MAX with IF (Array Formula)

To find the largest value in a specific category, use an array formula:

{=MAX(IF(A2:A10="Category1", B2:B10))}

Press Ctrl + Shift + Enter instead of just Enter to make it an array formula.

Using MAXIFS (Excel 2016+)

If you’re using Excel 2016 or newer, the MAXIFS function simplifies the process:

=MAXIFS(B2:B10, A2:A10, "Category1")

This formula returns the highest value in B2:B10 where A2:A10 equals “Category1”.

Finding the Max Value and Returning Another Column

Sometimes, you need to find the max value and return data from another column. Here’s how:

=INDEX(A2:A10, MATCH(MAX(B2:B10), B2:B10, 0))

This formula matches the highest value in B2:B10 and returns the corresponding value from column A.

MAX vs. LARGE: What’s the Difference?

While MAX extracts the highest value, LARGE allows you to find the nth largest value.

=LARGE(A1:A10, 2)

This formula returns the second highest value from A1:A10.

Conclusion

The MAX function in Excel is an essential tool for data analysis. Whether you’re working with single ranges, multiple ranges, or conditional filtering, knowing how to use MAX effectively can save time and improve your data insights. For more advanced filtering, consider using MAXIFS or combining MAX with INDEX and MATCH.

 

Other interesting article:

How MIN works in Excel? Best MIN examples