Jdolsak said:
I'm working with lists of numbers that should return bi and multi-modal
results when analyzed.
Is there a way to get MODE() to return these results? Or is there another
method to get correct results for the modes of bi- and multi-modal data?
MODE returns the first mode it finds. If you had (grossly oversimplified)
data like the following in A1:J10
7 1 9 3 0 7 0 5 1 9
4 7 5 5 3 2 5 4 3 7
2 5 9 9 7 6 8 2 1 5
1 0 7 6 6 2 3 3 0 9
7 8 6 1 0 5 1 9 7 3
3 5 8 7 2 0 5 8 3 0
8 1 8 5 1 3 9 1 7 4
5 9 0 3 1 6 6 8 5 7
7 2 3 3 1 1 2 3 5 5
6 7 6 7 1 1 8 0 3 4
MODE(A1:J10) would be 7 because 7 is one of the 4 numbers with 14 instances
and it appears before any of the other 3. If you want the next mode, use the
array formula
=MODE(IF(A1:J10<>7,A1:J10))
or
=MODE(IF(A1:J10<>MODE(A1:J10),A1:J10))
You could continue with the brute force approach for subsequent modes, but
there's a more elegant way to do this. If the modes would be recorded in
column L beginning in cell L1, use the following formulas.
L1:
=IF(COUNT(MODE(A1:J10)),MODE(A1:J10),"")
L2 [array formula]:
=IF(SUMPRODUCT(--(FREQUENCY($A$1:$J$10,$A$1:$J$10)=COUNTIF($A$1:$J$10,
MODE($A$1:$J$10))))>=ROWS(L$1:L2),MODE(IF(COUNTIF(L$1:L1,$A$1:$J$10)=0,
$A$1:$J$10)),"")
Fill L2 down until it returns "".