View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Domenic
 
Posts: n/a
Default Mode or frequency

Assuming that A2:A10 contains your data, here are two options...

[Option 1]

B1:

=MODE(A2:A10)

B2, copied down:

=MODE(IF(COUNTIF(B$2:B2,A$2:A$10)=0,A$2:A$10))

....confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

[Option 2]

This option will generate a Top N list (Top 1, Top 3, Top 5, etc.),
where you choose N, and which will take into consideration ties for Nth
place...

B2, copied down:

=IF(ISNA(MATCH(A2,A$1:A1,0)),COUNTIF(A2:A$10,A2)," ")

C2, copied down:

=IF(N(B2),RANK(B2,B$2:B$10)+COUNTIF(B$2:B2,B2)-1,"")

D1: enter 3, indicating you want a Top 3 list

*Enter the Top N list of interest

E1:

=MAX(IF(B2:B10=INDEX(B2:B10,MATCH(D1,C2:C10,0)),C2 :C10))-D1

....confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

F2, copied down:

=IF(ROWS(F$2:F2)<=$D$1+$E$1,INDEX(A$2:A$10,MATCH(R OWS(F$2:F2),$C$2:$C$10,
0)),"")

Hope this helps!

In article ,
Laffin wrote:

I have a large data set. Within the column I have determined the mode. How
do I find the second most common number, third most common, etc.?

240
240
240
240
240
240
240
240
288
288
288
300