Top 5 from sub-array

morsagmon

New Member
Joined
May 6, 2015
Messages
28
Hi.

I have a table (PipelineTable) with these columns:
P
Amount

I need to extract the top 5 amounts from the rows that meet a criteria: P is a fraction (between 0 and 1).
For example, if this is the PipelineTable:

[TABLE="class: grid, width: 100, align: left"]
<tbody>[TR]
[TD]P[/TD]
[TD]Amount[/TD]
[/TR]
[TR]
[TD]0.5[/TD]
[TD]25[/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD]50[/TD]
[/TR]
[TR]
[TD]0.75[/TD]
[TD]45[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD]0.5[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]0.75[/TD]
[TD]25[/TD]
[/TR]
[TR]
[TD]0.25[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]0.75[/TD]
[TD]12[/TD]
[/TR]
</tbody>[/TABLE]
















The top 5 results I'm after would be:
45
25
25
20
12

I'd prefer not to code a script for this and use a direct formula.
Using Array Formulas is fine if needed.

Thanks!
Mor
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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