Thread: Mode function
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default Mode function

With
A1:A11 containing this list:
1
2
3
2
2
3
3
4
5
6
(blank)

This formula returns the count of modes:
C1:
=SUM(--(FREQUENCY($A$1:$A$10,$A$1:$A$10)=MAX(FREQUENCY($A $1:$A$10,$A$1:$A$10))))

This formula returns the MODES in order of occurrence:
D1: =LARGE(INDEX((FREQUENCY($A$1:$A$10,$A$1:$A$10)=
MAX(FREQUENCY($A$1:$A$10,$A$1:$A$10)))*$A$1:$A$11, 0),ROWS($1:1))

Copy D1 down as far as you need.

In the above example, there are 2 modes and the formulas return....
D1: 3
D2: 2
D3: ""

Does that help?
Post back if you have more questions.
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)

"Guy Lydig" wrote in message
...
Why does the MODE function return only the largest value if an array of
numbers has more than one mode? How can I get it to return all the modes?

TIA

Guy