Top 10 Text Values
Assuming that A2:A100 contains your text values, try the following which
will take into consideration ties for 10th place...
B2, copied down:
=IF((A2<"")*(ISNA(MATCH(A2,$A$1:A1,0))),COUNTIF($ A$2:$A$100,A2),"")
C2, copied down:
=IF(N(B2),RANK(B2,$B$2:$B$100)+COUNTIF($B$2:B2,B2)-1,"")
D1: 10
This indicates that you want a Top 10 list. You can change this as
necessary. For example, if you want a Top 5 list, enter 5 instead.
E1:
=MAX(IF(B2:B100=INDEX(B2:B100,MATCH(D1,C2:C100,0)) ,C2:C100))-D1
....confirmed with CONTROL+SHIFT+ENTER, not just ENTER.
F2, copied down:
=IF(ROW()-ROW($F$2)+1<=$D$1+$E$1,INDEX($A$2:$A$100,MATCH(ROW ()-ROW($F$2)+
1,$C$2:$C$100,0)),"")
Hope this helps!
In article ,
KarenH wrote:
I have a column of text values in which I need to display the ten most
frequently occurring. I tried setting the AutoFilter and choosing "Top 10",
but it doesn't seem to be doing anything. I checked into some functions that
I thought might work, like Frequency and Rank, but those seem to be for
numbers only. Is there a way I can accomplish this? Thanks.
|