second highest

methody

Well-known Member
Joined
Jun 17, 2002
Messages
847
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).

wigi

Well-known Member
Joined
Jul 10, 2006
Messages
7,958
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
=LARGE(range,2)

Wigi
 

Smitty

Legend
Joined
May 15, 2003
Messages
29,536
Check out RANK in the helpfile.

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

HTH,

Smitty
 

HalfAce

MrExcel MVP
Joined
Apr 6, 2003
Messages
9,454
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
Joined
Jul 10, 2006
Messages
7,958
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web

ADVERTISEMENT

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.
 

Smitty

Legend
Joined
May 15, 2003
Messages
29,536

ADVERTISEMENT

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
Joined
May 28, 2005
Messages
50,670
Office Version
  1. 365
Platform
  1. Windows
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
Joined
May 15, 2003
Messages
29,536
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
 

wigi

Well-known Member
Joined
Jul 10, 2006
Messages
7,958
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
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
 

Forum statistics

Threads
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.
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
Top