Get Top 5 values in a list containing Duplicates

adaytay

New Member
Joined
Nov 27, 2003
Messages
47
Hey guys. It's been a while!

As I've spent the last few years in Access and SQL land, I've gotten a bit rusty in some areas of Excel, and this is bugging me - am trying to do something which should be straight-forward, but is turning into a head-scratcher!

I have a risk matrix, which has a load of scores in. The request from engineering is that they want to see the top 5 unique values (aka highest risk items) highlighted. Originally the workbook had conditional formatting, but it's not working. As there are >5 rows with the highest score, it only highlights these, and not the next 4 lowest numbers. I need a formula to identify the 5th highest unique number in the list - I'll then automatically trigger the conditional formatting to highlight the 5 highest values (ie => the 5th highest).

That bit I can do - I am just struggling on the formula to identify the 5 highest unique values. Can anyone assist?

Example values:

RPN
84
84
84
96
210
210
210
80
64
128
40
120
80
224
240
240
240
240
240
240
224
224
96

Appreciate your help - thanks :)

Ad
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
If using Excel 2010 or later try this.

Excel Workbook
E
1
2105
3108
4103
5105
6103
7102
8101
9106
10108
11105
12107
13100
14102
15
CF Top 5 Unique
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E21. / Formula is =E2>=AGGREGATE(14,6,E$2:E$14/(MATCH(E$2:E$14,E$2:E$14,0)=ROW(E$2:E$14)-ROW(E$2)+1),5)Abc
 
Upvote 0
For all versions.

Excel Workbook
E
1
2105
3108
4103
5105
6103
7102
8101
9106
10108
11105
12107
13100
14102
15
CF Top 5 Unique (2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E21. / Formula is =E2>=LARGE(IF(MATCH(E$2:E$14,E$2:E$14,0)=ROW(E$2:E$14)-ROW(E$2)+1,E$2:E$14),5)Abc
 
Upvote 0

Forum statistics

Threads
1,215,092
Messages
6,123,064
Members
449,090
Latest member
fragment

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