Return top performer, second top, third top, etc

Simon4s

Board Regular
Joined
Sep 22, 2014
Messages
145
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:

Some videos you may like

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Logit

Well-known Member
Joined
Aug 31, 2016
Messages
3,861
.
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
 

bosco_yip

Well-known Member
Joined
Dec 2, 2002
Messages
1,938
Office Version
  1. 2019
Platform
  1. Windows
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
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,201
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)))
 

Watch MrExcel Video

Forum statistics

Threads
1,123,125
Messages
5,599,850
Members
414,342
Latest member
K Darrell Smith

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