second highest

methody

Well-known Member
Joined
Jun 17, 2002
Messages
857
Hello
MAX gives the highest number in a range. What gives the second highest?
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Check out RANK in the helpfile.

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

HTH,

Smitty
 
Upvote 0
Hello methody,
If your range were A1:A5 then:
=LARGE(A1:A5,2)

(If you wanted the 3rd highest). . .
=LARGE(A1:A5,3)
. . . etc.
 
Upvote 0
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.
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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. :unsure:

Smitty
 
Upvote 0
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. :unsure:

Smitty

No prob Smitty :wink:

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

Cheers

Wigi
 
Upvote 0

Forum statistics

Threads
1,213,551
Messages
6,114,268
Members
448,558
Latest member
aivin

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