Jump to content

Documentation/Calc Functions/MAXA

From The Document Foundation Wiki

Function name:

MAXA

Category:

Statistical Analysis

Summary:

Determines the maximum value contained in the supplied set of numbers, ignoring empty cells.

MAXA is a variant of the MAX function. The main difference between the two is that MAX ignores cells containing text, whereas MAXA treats text strings as the number 0.

Syntax:

MAXA(Value 1 [; Value 2 [; … [; Value 255]]])

Returns:

Returns a real number, which is the maximum value in the supplied set of numbers. Note that 0 may be returned even if there are no explicit occurrences of that value in the list, because any cells containing text are assigned the value 0.

Arguments:

Value 1, Value 2, … , Value 255 give the set of real numbers from which the maximum is to be identified. Each argument may be a value or an expression, a reference to a single cell, a reference to a cell range, the name of a named or database range, or an inline array.

Note that although MAXA can accept up to 255 arguments, each argument could specify a range of cells. This means that the number of real numbers processed could be many more than 255.

The following conditions (including errors) may be encountered:

  • Empty cells are ignored.
  • Text is treated as the number 0. Unlike MAX, MAXA does not generate an error if an argument is a string in quotation marks.
  • If there are no supplied numbers, then MAXA returns 0.
  • If only one value is supplied, then MAXA returns that value.

Additional details:

  • MAXA converts any text in cells to 0. If you suspect wrong results, look for text within the supplied data range(s). To highlight text content within a data range, use Calc's View ▸ Value Highlighting feature.

Examples:

Formula Description Returns
=MAXA(A1:A3; 9; 5; 4) where cells A1:A3 contain the values 1, 2, and 3 respectively. Here the function returns the largest of the six supplied values. 9
=MAXA(1.5; -2; 0; -4.2) Here the function returns the largest of the four supplied values. 1.5
=MAXA({5, 2, 8, 10, 2}) Here the function returns the largest of the five values supplied as an inline array. 10
=MAXA(A1; A2; A3; A4) where cells A1:A2 contain the values -4 and -2 respectively, while cell A3 is blank and cell A4 contains the text "LibreOffice" (entered without typing the quotation marks). Here the function ignores the empty cell but treats the cell containing a string as if it contained the number 0. Hence, the value returned is the largest of the three values -4, -2, and 0. 0

Related LibreOffice functions:

MAX

MAXIFS

MIN

MINA

MINIFS

ODF standard:

Section 6.18.46, part 2

Related (or similar) Excel functions:

MAXA