View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ufo_pilot
 
Posts: n/a
Default 5 highest then list names

It 'sorta' worked for me
I dragged it past the Scores before it came up with any names
(E1)
it gave me the names --- great
the one for (F1) did not work, whichever way I tried.
But no loss here, the names were in the correct order I added a new column
to the right of the names which equaled the column to the left of the names
(so I can use VLOOKUP)
which I have done and it works great
Thank you all
I will no less be tinkering around with a copy of the sheert to further
investigate.

"Ron Rosenfeld" wrote:

On Thu, 12 Jan 2006 04:16:03 -0800, ufo_pilot
wrote:

I've tried several different ways to solve this problem:
I would like to list the names with the 5 highest scores
some are tied for position.
all the formulae I've tried does not result in what I expected
Where am I going wrong??


col A col B
1 John
1 Mary
2 Sue
3 Bob
3 Jester
5 Sam
15 Tina
10 Rex
10 Lowell
4 Grinch

=VLOOKUP(LARGE($A$12:$A$100,ROW(1:1)),$A$12:$B$10 0,1,FALSE)
=VLOOKUP(LARGE($A$12:$A$100,ROW(5:5)),$A$12:$B$10 0,2,FALSE)
15 Tina
10 Rex
10 Rex
5 Sam
4 Grinch
3 Bob
3 Bob
2 Sue
1 John
1 John

gives me duplicates of same number in col A ( will not find next number down
- eliminates Mary, Jester and Lowell)

=VLOOKUP(MAX(A:A),A:B,2,FALSE)&" "&MAX(A:A)
gives me only the MAX with the name

I have even used CONCATENATE to solve it, but that did not work either

what to do???
Thanks for any help you can offer.


One way to do this is to sort the table by scores, descending.

If you want a formulaic version, you can download and install Longre's free
morefunc.xll add-in from http://xcell05.free.fr/

Then, with your two column range named "rng", and the column of scores named
"scores", enter these formulas in two adjacent cells:

E1:
=IF(INDEX(VSORT(rng,Scores),ROWS($1:1),1)=LARGE(
Scores,5),INDEX(VSORT(rng,Scores),ROWS($1:1),1),"" )

F1:
=IF(INDEX(VSORT(rng,Scores),ROWS($1:1),1)=LARGE(
Scores,5),INDEX(VSORT(rng,Scores),ROWS($1:1),2),"" )


Then select both cells and copy/drag down no further than the total number of
entries in Scores (dragging further will give a #REF! result).




--ron