picking the 7 highest numbers

Jaffa_ca

New Member
Joined
Oct 7, 2006
Messages
9
i need some help with a formula,
what i want do to is to have excel go through the document and count how many times each number (from 1 - 30) appears and then sort them according to how many times the number actullay does appear. follow?
ex. 1 appears 5 times
2 appears 3 times
3 appears 2 times
4 appears 7 times
5 appears 9 times
so i want it so tell me how times each number appears and sort them from highest to lowest
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

plettieri

Well-known Member
Joined
Sep 4, 2002
Messages
1,556
Platform
  1. MacOS
Hi Jaffa_ca

You might try here as a start...

http://www.mrexcel.com/board2/viewtopic.php?t=78995&highlight=largest++numbers#javascript:void(0);


plettieri
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
i need some help with a formula,
what i want do to is to have excel go through the document and count how many times each number (from 1 - 30) appears and then sort them according to how many times the number actullay does appear. follow?
ex. 1 appears 5 times
2 appears 3 times
3 appears 2 times
4 appears 7 times
5 appears 9 times
so i want it so tell me how times each number appears and sort them from highest to lowest
Book8
ABCDE
1NumFreq8
231NumFreq
31285
42424
52 53
68512
78 62
87131
94171
108 41
112  
1262
132 
146 
158 
1653
178 
181 
195 
205 
Sheet1


B2, copied down:

=IF(ISNUMBER(MATCH(A2,$A$1:A1,0)),"",COUNTIF($A$2:$A$20,A2))

D1:

=COUNT(B2:B20)

D3:

=IF(N(E3),INDEX(A$2:A$20,SMALL(IF(B$2:B$20=E3,ROW(B$2:B$20)-ROW(B$2)+1),COUNTIF(E$3:E3,E3))),"")

which is confirmed with control+shift+enter (not with enter) and copied down.

E3:

=IF(ROWS($E$3:E3)<=$D$1,LARGE($B$2:$B$20,ROWS($E$3:E3)),"")
 

tusharm

MrExcel MVP
Joined
May 28, 2002
Messages
11,029
Let XL do the work for you. Create a PivotTable and use it's option to 'Show Top N' with N set to 7.

i need some help with a formula,
what i want do to is to have excel go through the document and count how many times each number (from 1 - 30) appears and then sort them according to how many times the number actullay does appear. follow?
ex. 1 appears 5 times
2 appears 3 times
3 appears 2 times
4 appears 7 times
5 appears 9 times
so i want it so tell me how times each number appears and sort them from highest to lowest
 

Jaffa_ca

New Member
Joined
Oct 7, 2006
Messages
9
Great thks so much for the help, i used the pivot table, and it works good
i just can't figure out how to make it only choose the 7 highest numbers but i think i'll might be able to figure it out in the morn
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209

ADVERTISEMENT

Great thks so much for the help, i used the pivot table, and it works good
i just can't figure out how to make it only choose the 7 highest numbers but i think i'll might be able to figure it out in the morn

Just change the default value of 10 to 7.
 

Jaffa_ca

New Member
Joined
Oct 7, 2006
Messages
9
i don't see any option for the pivot table called default value, btw this is excel 2003 if it makes any difference
 

Forum statistics

Threads
1,141,588
Messages
5,707,264
Members
421,498
Latest member
matinebi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top