# second highest

#### methody

##### Well-known Member
Hello
MAX gives the highest number in a range. What gives the second highest?

### Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

=LARGE(range,2)

Wigi

#### Smitty

##### Legend
Check out RANK in the helpfile.

In your case it'd be something like =RANK(2,Range)

HTH,

Smitty

#### HalfAce

##### MrExcel MVP
Hello methody,
If your range were A1:A5 then:
=LARGE(A1:A5,2)

(If you wanted the 3rd highest). . .
=LARGE(A1:A5,3)
. . . etc.

#### wigi

##### Well-known Member

Check out RANK in the helpfile.

In your case it'd be something like =RANK(2,Range)

HTH,

Smitty

Please explain more, I don't see this one here, Pennysaver.

#### methody

##### Well-known Member
thank you everybody

#### Smitty

##### Legend

Please explain more, I don't see this one here

From the helpfile:

RANK - Returns the rank of a number in a list of numbers. The rank of a number is its size relative to other values in a list. (If you were to sort the list, the rank of the number would be its position.)

Syntax

RANK(number,ref,order)

Number is the number whose rank you want to find.

Ref is an array of, or a reference to, a list of numbers. Nonnumeric values in ref are ignored.

Order is a number specifying how to rank number.

If order is 0 (zero) or omitted, Microsoft Excel ranks number as if ref were a list sorted in descending order.
If order is any nonzero value, Microsoft Excel ranks number as if ref were a list sorted in ascending order.
Remarks

RANK gives duplicate numbers the same rank. However, the presence of duplicate numbers affects the ranks of subsequent numbers. For example, in a list of integers sorted in ascending order, if the number 10 appears twice and has a rank of 5, then 11 would have a rank of 7 (no number would have a rank of 6).

For some purposes one might want to use a definition of rank that takes ties into account. In the previous example, one would want a revised rank of 5.5 for the number 10. This can be done by adding the following correction factor to the value returned by RANK. This correction factor is appropriate both for the case where rank is computed in descending order (order = 0 or omitted) or ascending order (order = nonzero value).

Correction factor for tied ranks=[COUNT(ref) + 1 – RANK(number, ref, 0) – RANK(number, ref, 1)]/2.

In the following example, RANK(A2,A1:A5,1) equals 3. The correction factor is (5 + 1 – 2 – 3)/2 = 0.5 and the revised rank that takes ties into account is 3 + 0.5 = 3.5. If number occurs only once in ref, the correction factor will be 0, since RANK would not have to be adjusted for a tie.

Smitty

#### Peter_SSs

##### MrExcel MVP, Moderator
Smitty

I think what wigi is getting at is that your suggested formula will return what position (rank) the number is in the range not which number has a particular rank.
Mr Excel.xls
ABCDE
10Second Largest (what the OP asked for)7
27Rank of number 23
31
42
512
6
LARGE v RANK

#### Smitty

##### Legend
My bad Peter, I was assuming a sorted & sequential list...Like 10, 9, 8, 7, 6, 5...etc, and completely misunterstood Wigi's comment & Methody's request.

Smitty

#### wigi

##### Well-known Member
My bad Peter, I was assuming a sorted & sequential list...Like 10, 9, 8, 7, 6, 5...etc, and completely misunterstood Wigi's comment & Methody's request.

Smitty

No prob Smitty :wink:

I thought you had an ingenious use of the RANK function, so wanted to learn from that

Cheers

Wigi

Replies
22
Views
330
Replies
5
Views
137
Replies
2
Views
139
Replies
6
Views
173
Replies
2
Views
51

1,141,759
Messages
5,708,361
Members
421,566
Latest member
7Nabisco

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