# second best

#### paj*

##### New Member
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)).

paj*

### Excel Facts

To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

#### Jonmo1

##### MrExcel MVP
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)

#### Scott Huish

##### MrExcel MVP
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)))

#### paj*

##### New Member
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

#### Scott Huish

##### MrExcel MVP
Best:
=MAX(G1:G10) or =LARGE(G1:G10,1)

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

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

Replies
4
Views
4K
Replies
6
Views
241
Replies
4
Views
150
Replies
4
Views
522
Replies
4
Views
185

1,191,524
Messages
5,987,103
Members
440,079
Latest member
MarchePR

### 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.

### Which adblocker are you using?

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

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