RagDyeR said:
Since you mentioned the possibility of perhaps also needing the *3rd* most
occurring number, try this non-array formula, which will give you *whatever*
occurrence number that you enter in say A1:
=INDEX(C15:C659,MATCH(LARGE(FREQUENCY(C15:C659,C15:C659),A1),FREQUENCY(C15:C659,C15:C659),0))
If the OP might want the 3rd most frequently occurring, he might also
want the 4th most frequently occurring, etc. If so, FAR MORE EFFICIENT
to use *ONE* FREQUENCY call stored in some other range of 1 column by
645 rows.
Unfortunately, this approach won't work when different values appear
the same number of times because the MATCH call will always return the
index of the first of them, NEVER the index of the second or
subsequent. For example, with the following in a range named D,
1
2
3
1
2
1
1
2
3
2
and another, single cell named range n evaluating to 1, the formula
=INDEX(d,MATCH(LARGE(FREQUENCY(d,d),n),FREQUENCY(d,d),0))
returns 1, but it still returns 1 when you change n to 2. When you
change n to 3, it returns 3.
If the OP wants to the nth most frequently occurring value, there's no
ROBUST way to do this that doesn't require referring to ALL the more
frequently occurring values. That so, better to create an ordered list
of those values. With the source data in a range named d and the
results beginning in cell E1,
E1: =MODE(d)
E2: =MODE(IF(d<>"",IF(d<>MODE(d),d)))
E3: =MODE(IF(d<>"",IF(COUNTIF(E$1:E2,d)=0,d)))
E2 and E3 are array formulas. Fill E3 down as far as needed.