MAX
Returns the largest numeric value from one or more arguments.
MAX scans scalar values and ranges, considering only values that can be treated as numbers.
The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.
Syntax
=MAX(number1, [number2], ...)
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
number1 | number (range) | Required | — |
number2 | number (range) | Optional | — |
Accepts a variable number of arguments. Minimum: 1.
Differences from Excel
Unparseable text supplied directly, such as "x", is ignored by Formualizer. Excel returns #VALUE!.
Remarks
- Errors in any scalar argument or range cell propagate immediately.
- In ranges, non-numeric cells are ignored.
- Scalar text is included only when it can be coerced to a number.
- If no numeric value is found,
MAXreturns0.
Examples
Find the largest numeric value of 4, 8 and 12.
Formula =MAX(4,8,12)
Expected result 12
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Pass one three-element array to compute the largest numeric value.
Formula =MAX({4,8,12})
Expected result 12
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
The lone number is the maximum.
Formula =MAX(7)
Expected result 7
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
A division error among 4 and 12 prevents computing the largest numeric value.
Formula =MAX(4,1/0,12)
Expected result #DIV/0!
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Maximum in a numeric range
Formula =MAX(A1:A3)
| A | |
|---|---|
| 1 | 5 |
| 2 | 9 |
| 3 | 1 |
Expected result 9
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Scalar text can be coerced
Formula =MAX(2, "11", 4)
Expected result 11
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Related functions
FAQ
Why can MAX return 0 for non-numeric input sets?
When no numeric values are found, MAX returns 0 by design.
Does MAX evaluate scalar text arguments?
Yes, but only when scalar text can be coerced to a numeric value.