lookup for top 10 values

swendingo

Board Regular
Joined
Sep 11, 2003
Messages
90
I have a table that has 1000 people who have a duration of time associated with them. I need to get the names and times of the top 10 people. I would prefer to use formulas so that I can just make a template that I can paste my data into.

anyone one have any ideas?
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
See if this helps.


Input this formula in cell D2 and copy it down as far you needed:

=LARGE(B$2:B$8,ROW()-1)

Input this formula in cell E2 and copy it down as far you needed:

=INDEX(A$2:A$398,SMALL(IF(B$2:B$398=D2,ROW(B$2:B$398)-ROW(D$2)+1),COUNTIF(D$2:D2,D2)))

That formula is an-array so it must be confirmed with:

Ctrl+Shift+Enter
Top sales.xls
ABCDEF
1NamesSalesTop 3
2John2050Phillip
3David2540Victor
4Sandy2540Mike
5Rob30
6Victor40
7Mike40
8Phillip50
9
10
11
Sheet1
 
Upvote 0
swendingo

What do you want to happen if there are equals, that might mean more than 10 people share the top 10 durations?

Have you cosidered Data|Filter|AutoFilter then on the Duration column drop-down choose 'Top 10'?
 
Upvote 0
The system I often used as can be seen in my post in:

http://www.mrexcel.com/board2/viewtopic.php?t=69970

is troublesome when the number of the data points/records reaches 5000, noticed in fairwinds's post:

http://www.mrexcel.com/board2/viewtopic.php?t=163028

Modifying for control vane's suggestion, we might have an improved Top N system:
Top 10 List swendingo.xls
ABCDEF
13
24
3NameScoreTop Score(s)Top Performer(s)
4dawn7590brian
5damon8590jon
6dan7085damon
7brian9085christine
8christine85  
9ian80
10jon90
11
Data


E1: 3

which is the desired size of the Top N list.

E2:

=COUNTIF(B4:B10,">="&LARGE(B4:B10,E1))

which determines the actual size, dictated by data which might contain ties of the Nth value.

E4, copied down:

=IF(ROWS(E$4:E4)<=$E$2,LARGE($B$4:$B$10,ROWS(E$4:E4)),"")

which lists the actual Top N scores. Note that this list needs to be generated.

F4:

=IF(N(E4),INDEX(A$4:A$10,SMALL(IF(B$4:B$10=E4,ROW(B$4:B$10)-ROW(B$4)+1),COUNTIF(E$4:E4,E4))),"")

which must be confirmed with control+shift+enter (not just with enter) and copied down.
 
Upvote 0
Thanks guys
I am customizing to suit I will let you know how it goes.

as far as the duplicates the data isn't insanely sensitive so if the there is a 3 way tie for 10th place it doesn't matter with I use.
 
Upvote 0
Thanks guys
I am customizing to suit I will let you know how it goes.

as far as the duplicates the data isn't insanely sensitive so if the there is a 3 way tie for 10th place it doesn't matter with I use.

It's a matter of correctness. Also, I don't think people involved would like to be left out.
 
Upvote 0
Can't get this to work...

Mr. Aladin posted this great method for creating a top 10 list. I am attempting to adopt this to a spreadsheet however I need excel to only add a name to the top ten if the value in another cell is equal to a text string.

Still a newbie so any help would be greatly appreciated,

Go Bucks..
 
Upvote 0
Great Info - was just about to start working on method of gathering Top 5 numbers so will begin here.

Question: Is there a way to look at both Positive & Negative amounts and pull Top 5 Largest Numbers?

Example:

10 Numbers [ 25,000; 15,000; 12,000; 10,000; 8,000; 4,000; -6,000; -11,000; -17,000; -32,000 ]

Top 5: -32,000; 25,000; -17,000; 15,000; 12,000

Thanks
 
Upvote 0
Excel?,

Looks like you just need to utilize the Absolute value function when specifying your range. Using Mr. Aladin's post as an example:


=IF(ROWS(E$4:E4)<=$E$2,LARGE(ABS($B$4:$B$10),ROWS(E$4:E4)),"")

Hope this works. / Steve
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,559
Members
449,089
Latest member
Motoracer88

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
Back
Top