Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
kwiklearner
 
Posts: n/a
Default How do a find a second Max?


Hi, I'm trying to find the maximum and second maximum number out of a
range? I have tried: MAX(IF($A:$A<B1,$A:$A,0)). Any help would be
great.


--
kwiklearner
------------------------------------------------------------------------
kwiklearner's Profile: http://www.excelforum.com/member.php...o&userid=31909
View this thread: http://www.excelforum.com/showthread...hreadid=519936

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default How do a find a second Max?


Try the LARGE function:

=LARGE(A:A,2)

The second arugment of the function is where you set which large value
you want. The example above returns the 2nd largest value in Col_A.

Does that help?

Regards,
Ron


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=519936

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default How do a find a second Max?

Hi!

If your data looks like this:

10
10
10
8
9

=MAX(A1:A5) = 10

Technically, the second max value is also 10:

=LARGE(A1:A5,2) = 10

But if you want the literal second max value:

Array entered using the key combo of CTRL,SHIFT,ENTER:

=MAX(IF(A1:A5<MAX(A1:A5),A1:A5)) = 9

Biff

"kwiklearner"
wrote in message
...

Hi, I'm trying to find the maximum and second maximum number out of a
range? I have tried: MAX(IF($A:$A<B1,$A:$A,0)). Any help would be
great.


--
kwiklearner
------------------------------------------------------------------------
kwiklearner's Profile:
http://www.excelforum.com/member.php...o&userid=31909
View this thread: http://www.excelforum.com/showthread...hreadid=519936



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
kwiklearner
 
Posts: n/a
Default How do a find a second Max?


Thanks, this is great...

Ron Coderre Wrote:
Try the LARGE function:

=LARGE(A:A,2)

The second argument of the function is where you set which large value
you want. The example above returns the 2nd largest value in Col_A.

Does that help?

Regards,
Ron



--
kwiklearner
------------------------------------------------------------------------
kwiklearner's Profile: http://www.excelforum.com/member.php...o&userid=31909
View this thread: http://www.excelforum.com/showthread...hreadid=519936

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default How do a find a second Max?

Your formula would have worked as

=MAX(IF($A:$A<B1,$A:$A)

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.


--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"kwiklearner"
wrote in message
...

Hi, I'm trying to find the maximum and second maximum number out of a
range? I have tried: MAX(IF($A:$A<B1,$A:$A,0)). Any help would be
great.


--
kwiklearner
------------------------------------------------------------------------
kwiklearner's Profile:

http://www.excelforum.com/member.php...o&userid=31909
View this thread: http://www.excelforum.com/showthread...hreadid=519936





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove
 
Posts: n/a
Default How do a find a second Max?

Bob Phillips wrote...
Your formula would have worked as

=MAX(IF($A:$A<B1,$A:$A)

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.


Not so. Excel can't handle the $A:$A<B1 term.

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default How do a find a second Max?


How about this?

For a list of numbers in A1:A10
Example:
A1: 1
A2: 2
A3: 3
A4: 4
A5: 5
A6: 9
A7: 9
A8: 9
A9: 9
A10: 9

Cell B1 holds the rank to find, ignoring duplicates.

Example:
B1: 3 (indicating that you want the 3rd largest number)

C1:
=IF(B1=1,MAX($A$1:$A$10),LARGE(IF($A$1:$A$10<LARGE ($A$1:$A$10,B1-1),$A$1:$A$10,0),B1-1))

Note 1: Commit that array formula by holding down the [Ctrl][Shift]
keys and press [Enter].

Note 2: In case window wrapping impacts this post, there are no spaces
in that formula.

Sample Values:
For B1: 1........C1: Returns 9
For B1: 2........C1: Returns 5
For B1: 3........C1: Returns 4
etc

Does that help?

Regards,
Ron


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=519936

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default How do a find a second Max?


Array formla:
C1: =IF(B1=1,MAX($A$1:$A$10),LARGE(IF($A$1:$A$10<LARGE
($A$1:$A$10,B1-1),$A$1:$A$10,0),B1-1))


Nah...doesn't work for mid-range dupes.

Ron


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=519936

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find and Replace blakrapter Excel Worksheet Functions 3 December 15th 05 12:25 AM
Code needed to find records from bottom up Andy Excel Discussion (Misc queries) 4 December 5th 05 03:27 AM
find a cells from a range of cell kelvintaycc Excel Worksheet Functions 2 April 2nd 05 07:20 PM
How do I find a column entry closest to a particular value feman007 Excel Worksheet Functions 2 March 9th 05 03:48 PM
Excel has a "Find Next" command but no "Find Previous" command. Michael Fitzpatrick Excel Discussion (Misc queries) 2 January 10th 05 11:45 PM


All times are GMT +1. The time now is 04:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"