MAXA function
MAXA returns the largest value like MAX, but it counts TRUE as 1, FALSE as 0 and text in ranges as 0 instead of skipping them. It is useful when TRUE/FALSE flags are part of the data.
Example
Read it as a sentence: find the largest value in A1:A8, including any text or logical values, which gives 9.
Excel shows 9
A
1
2
2
4
3
4
4
4
5
5
6
5
7
7
8
9
Data
Syntax
MAXA(value1, [value2], ...)
Arguments in [square brackets] are optional.
-
value1(required) - First value, reference or range.
-
value2(optional) - More values or ranges.
Returns: The largest value, treating TRUE as 1, FALSE as 0 and text in ranges as 0.
What Excel actually returns
Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.
| Formula | Excel shows | Case |
|---|---|---|
=MAXA({2,4,4,4,5,5,7,9}) | 9 | Array constant |
=MAXA(10,"20",TRUE) | 20 | Direct args: number, text-number, TRUE |
=MAXA(5) | 5 | Single number |
=MAXA({1,"2",TRUE,3}) | 3 | Array with text and boolean |
=MAXA(Data!A1:A8) | 9 | Range of numbers |
=MAXA(Data!B1:B8) | 40 | Mixed range: num, text-number, TRUE, blank, text, FALSE |
=MAXA(10,"abc") | #VALUE! | Direct arg: non-numeric text |
=MAXA(Data!C1:C5) | #N/A | Range containing #N/A |
The Data sheet these formulas read
A cell that starts with = holds that formula.
A
B
C
1
2
10
1
2
4
20
2
3
4
TRUE
=NA()
4
4
4
5
5
abc
5
6
5
30
7
7
FALSE
8
9
40
Data
Watch out for
- Text in a referenced range counts as 0, which can drag a negative maximum up to 0.
- Text typed directly as an argument that is not a number gives #VALUE!.
Where it works
- Excel
- MAXA is in every version of Excel from 2007 on.
- Google Sheets
- Same name, same behaviour for everyday use.
Part of Statistical functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .