how do I find the SECOND highest value in a series?

t_h_e_train

New Member
Joined
Aug 13, 2002
Messages
4
How do I find the 2nd highest value in a series? If i do Max(d4:d11) then I get the max. I just want to know how to do the second highest, max minus one, as it were.
Appreciate the help. I imagine it's an easy query. Thanks.D
This message was edited by t_h_e_train on 2002-08-14 16:33
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi,
I've another issue :(:eeek: !

I've a set of date in a range (mix of past, present (today) and future). I need a formula to pick up the min date which could be today or in the future but not the past.

Eg:
In the below range of dates, if i use Small and pick up the 1 smallest date the formula will pick up 21/Oct/2012, but I want the formula to pick up 24/Oct as 21/Oct has already passed as of today.

10/24/201210/23/2012
10/22/2012
10/21/2012
10/26/2012


Thanks,
Prash
 
Upvote 0
Hi,
I've another issue :(:eeek: !

I've a set of date in a range (mix of past, present (today) and future). I need a formula to pick up the min date which could be today or in the future but not the past.

Eg:
In the below range of dates, if i use Small and pick up the 1 smallest date the formula will pick up 21/Oct/2012, but I want the formula to pick up 24/Oct as 21/Oct has already passed as of today.

10/24/201210/23/2012
10/22/2012
10/21/2012
10/26/2012


Thanks,
Prash
Try this array formula**:

=MIN(IF(A1:A5>=TODAY(),A1:A5))

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.
 
Upvote 0
Hi Biff,
thank you for your quick reply, the formula works perfectly but needs a small tweek, the problem is the dates are not continuous in a row, its spread across different columns. I tried tweeking the formula as =MIN(IF((A2,B3,A4,B6)>=TODAY(),(A2,B3,A4,B6))) but it dint work. Can you help me please !!

thanks,
Prash
 
Upvote 0
Hi Biff,
thank you for your quick reply, the formula works perfectly but needs a small tweek, the problem is the dates are not continuous in a row, its spread across different columns. I tried tweeking the formula as =MIN(IF((A2,B3,A4,B6)>=TODAY(),(A2,B3,A4,B6))) but it dint work. Can you help me please !!

thanks,
Prash
The IF function doesn't directly accept multiple area references so it takes a bit more.

Array entered**:

=MIN(IF(CHOOSE({1,2,3,4},A2,A4,B3,B6)>=TODAY(),CHOOSE({1,2,3,4},A2,A4,B3,B6)))

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.
 
Upvote 0
The IF function doesn't directly accept multiple area references so it takes a bit more.

Array entered**:

=MIN(IF(CHOOSE({1,2,3,4},A2,A4,B3,B6)>=TODAY(),CHOOSE({1,2,3,4},A2,A4,B3,B6)))

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.
Just to add...

If there are no dates that meet the condition the formula will return 0. If you have the formula cell formatted as Date then it'll display something like 1/0/1900.

If you need to account for that let me know. Also, let me know what version of Excel you're using.
 
Upvote 0
Just to add...

If there are no dates that meet the condition the formula will return 0. If you have the formula cell formatted as Date then it'll display something like 1/0/1900.

If you need to account for that let me know. Also, let me know what version of Excel you're using.



Hi Biff,
The formula works perfectly, but yes as u pointed out that If there are no dates that meet the condition the formula will return 0, I need to leave the column blank instead of giving a 0 or 1/0/1900. Should i use iserror?

I use excel 2007.

Thanks a lot for your help !!!:biggrin: :)

Cheers,
Prash
 
Upvote 0
Hi Biff,
The formula works perfectly, but yes as u pointed out that If there are no dates that meet the condition the formula will return 0, I need to leave the column blank instead of giving a 0 or 1/0/1900. Should i use iserror?

I use excel 2007.

Thanks a lot for your help !!!:biggrin: :)

Cheers,
Prash
Try this...

=IFERROR(1/(1/MIN(IF(CHOOSE({1,2,3,4},A2,A4,B3,B6)>=TODAY(),CHOOSE({1,2,3,4},A2,A4,B3,B6)))),"")

Still array entered!
 
Upvote 0
Yipppeeee !! this is what i exactly wanted.. Thanks a million Mr. Biff !!! :cool: :) I wish i know excel like you do :)

Also can you explain me how this formula works.. i managed to figure out till IF(CHOOSE({1,2,3,4},A2,A4,B3,B6)>=TODAY(),CHOOSE({1,2,3,4},A2,A4,B3,B6)

But dint understand the
IFERROR(1/(1/MIN

Please help me understand so that i can use this formula some time in the future if reqd.

Cheers,
Prash
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,919
Messages
6,175,368
Members
452,638
Latest member
Oluwabukunmi

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