Subtotal function to pull top 5 values

MarkTiger

New Member
Joined
Jan 29, 2013
Messages
2
I am trying to pull the top 5 values from a list. The problem is the list has subtotals throughout, which I do not want to pull. Is there a way to use the Subtotal(4,range) function to select the top 4 items. I'm trying not to create a new column for ranking.

Thank you.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
you can use the =large formula, =large(array,1) =large(array,2) =large(array,3) =large(array,4) =large(array,5)
 
Upvote 0
Hi and welcome to the board.
<br />
Book1
ABCDE
1ValuesTop 5 Vals
244199
312295
428394
542492
672587
787
836
922
1077
11Subtotal420
1210
1394
1428
1517
16Subtotal149
1787
1860
198
2034
21Subtotal189
2295
2372
2469
2599
2652
2792
2819
2916
30Subtotal514
Sheet1
Cell Formulas
RangeFormula
E2{=LARGE(IF($A$2:$A$30<>"Subtotal",$B$2:$B$30),D2)}
E3{=LARGE(IF($A$2:$A$30<>"Subtotal",$B$2:$B$30),D3)}
E4{=LARGE(IF($A$2:$A$30<>"Subtotal",$B$2:$B$30),D4)}
E5{=LARGE(IF($A$2:$A$30<>"Subtotal",$B$2:$B$30),D5)}
E6{=LARGE(IF($A$2:$A$30<>"Subtotal",$B$2:$B$30),D6)}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Thank you. I went ahead and added a column to add "Subtotal" on the appropriate row and used the formula above.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

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