What MAX does and how to write it

MAX scans one or more ranges and returns the largest numeric value it finds.

=MAX(B2:B10)
=MAX(B2:B10, D2:D10)
=MAX(12, 7, 31)

You can pass up to 255 arguments: ranges, individual cells, or literal numbers. Empty cells and text values are ignored. If the range contains no numbers at all, Excel returns 0 (see below).

Find the maximum of an entire column

To cover a growing column without updating the range every week, reference the whole column:

=MAX(B:B)

One watch-out: if a numeric header sits at the top of the column, it will be included in the result. A text header like "Amount" is safely ignored.

MAX with a condition: MAXIFS

To find the largest value matching a condition, Excel 2019 and Microsoft 365 include MAXIFS:

=MAXIFS(C2:C50, B2:B50, "London")

This returns the highest value in C2:C50 for rows where B2:B50 equals "London". You can add more criteria pairs: =MAXIFS(C2:C50, B2:B50, "London", D2:D50, ">2024").

On older versions of Excel, wrap IF inside MAX (entered with Ctrl + Shift + Enter):

=MAX(IF(B2:B50="London", C2:C50))

MAX with dates

Excel stores dates as serial numbers (days since January 1, 1900), so MAX works directly on a column of dates to return the most recent date:

=MAX(A2:A100)

If the result appears as a number like 45000, simply format the cell as a Date—the underlying value is already right.

Combining MIN and MAX

MIN is the exact counterpart of MAX. Together they give you the spread of a dataset:

=MAX(B2:B10)-MIN(B2:B10)

Why does MAX return 0?

Almost always because the numbers are stored as text. Left-aligned digits, a small green error triangle in the corner, or data pasted from a web export all cause MAX to see zero numbers and return 0.

Three quick ways to check and fix it:

  • =ISTEXT(B2) returns TRUE if the cell is stored as text.
  • =VALUE(B2) converts numeric text into a real number.
  • Fastest fix: select the range, click the warning icon, and choose Convert to Number.