second best

paj*

New Member
Joined
Jun 18, 2007
Messages
10
Hi

How can I get the second best or second worst value out of an array?

I am searching for something like min(array; position(e.g. 2nd)).

Thanks in advance

paj*
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Use the LARGE Function for second best(largest) and SMALL for 2nd Works (smallest)

x = worksheetfunction.large(range("a:a"),2)

or

x = worksheetfunction.small(range("a:a"),2)
 
Upvote 0
If you have duplicates and don't want to count the duplicates.
For example if the highest number is 4 but there are two fours in this column, and down't want to count the second 4 as the second highest number, perhaps:

For the 2nd highest number:
=LARGE(G1:G5,1+COUNTIF(G1:G5,MAX(G1:G5)))

For the 2nd lowest number:
=SMALL(G1:G5,1+COUNTIF(G1:G5,MIN(G1:G5)))
 
Upvote 0
Thanks mates

But how can I do the following

I got 3 cells, one for the best, second for the second, third for the guess what?

All my values are in the array
g1:g10

no I got 3 numbers having the same value

how can I achieve that they all 3 are displayed in those 3 cells? In this case order doesn't matter, but I want to display all 3 as they are the best three
 
Upvote 0
Best:
=MAX(G1:G10) or =LARGE(G1:G10,1)

2nd Best
=LARGE(G1:G10,2)

3rd Best
=LARGE(G1:G10,3)
 
Upvote 0

Forum statistics

Threads
1,214,525
Messages
6,120,051
Members
448,940
Latest member
mdusw

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