Return top performer, second top, third top, etc

Simon4s

Board Regular
Joined
Sep 22, 2014
Messages
155
Office Version
  1. 2016
  2. 2013
In A1 i have:
=INDEX(D2:D6,MATCH(LARGE(E2:E6,C2,E2:E6,FALSE))


This formula returns the top most valuable customer (dog). But there is a tie for second place (cat and amy) but it returns Amy Twice. How do i fix this? Ty

ABCDE
Waffle901Dog30
Amy502Cat50
Amy503Amy50
Dog304Stick10
Stick5Waffle90

<tbody>
</tbody>
 
Last edited:

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
.
Your formula doesn't function ?

Here is a macro that will sort as you desire :

Code:
Option Explicit


Sub srtCol()


Columns("A:B").Select
Selection.Sort Key1:=Range("B1"), Order1:=xlDescending, Header:=xlGuess, _
    OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
    DataOption1:=xlSortNormal
    
End Sub
 
Upvote 0
1] In A2, copied down :

=LOOKUP(2,1/(LARGE(E$2:E$6+1/ROW($1:$5),ROWS($1:1))=E$2:E$6+1/ROW($1:$5)),D$2:D$6)

2] In B2, copied down :

=LARGE(E$2:E$6,C2)

Regards
Bosco
 
Upvote 0
Row\Col
A​
B​
C​
D​
E​
1​
5​
namevalue
2​
Waffle 90 Dog 30
3​
Amy 50 Cat 50
4​
Amy 50 Amy 50
5​
Dog 30 Stick 10
6​
Stick 10 Waffle 90
7​

In C1 just enter:

=COUNT(E2:E6)

In A2 control+shift+enter, not just enter, and copy down:

=IF(ROWS($A$3:A3)>$C$1,"",INDEX($D$2:$D$6,SMALL(IF($E$2:$E$6=$B2,ROW($D$2:$D$6)-ROW($D$2)+1),COUNTIFS($B$2:B2,B2))))

In B2 just enter and copy down:

=IF(ROWS($B$2:B2)>$C$1,"",LARGE($E$2:$E$6,ROWS($A$3:A3)))
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,700
Members
448,979
Latest member
DET4492

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