Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Next Unique Maximum


I posted here yesterday when I needed to find the second maximum number
in a range =Large(). However, now I need to find the next unique
maximum number. Is there a way without having to write If statements?
My current approach is:
=IF(LARGE(D:D,2)=MAX,IF(LARGE(D:D,3)=MAX,LARGE(D:D ,4),LARGE(D:D,3)),LARGE(D:D,2))
This is just the beginning so I was wondering if there is a more
effecient way to return the second unique maximum?
Thanks in advance for your help.


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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Next Unique Maximum

So you want to ignore all the values that are equal to the maximum?

=MAX(IF(A1:A20<MAX(A1:A20),A1:A20))

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

Adjust the range to match--but you can't use the whole column (if you ever
transpose your data).

Or maybe...

=IF(COUNT(A1:A20)=COUNTIF(A1:A20,MAX(A1:A20)),"not enough numbers",
MAX(IF(A1:A20<MAX(A1:A20),A1:A20)))

Just in case there isn't a second unique number.

(It's still an array formula)

kwiklearner wrote:

I posted here yesterday when I needed to find the second maximum number
in a range =Large(). However, now I need to find the next unique
maximum number. Is there a way without having to write If statements?
My current approach is:
=IF(LARGE(D:D,2)=MAX,IF(LARGE(D:D,3)=MAX,LARGE(D:D ,4),LARGE(D:D,3)),LARGE(D:D,2))
This is just the beginning so I was wondering if there is a more
effecient way to return the second unique maximum?
Thanks in advance for your help.

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


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Next Unique Maximum

Adjust the range to match--but you can't use the whole column

(Ignore that portion about transposing your data.)

Dave Peterson wrote:

So you want to ignore all the values that are equal to the maximum?

=MAX(IF(A1:A20<MAX(A1:A20),A1:A20))

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

Adjust the range to match--but you can't use the whole column (if you ever
transpose your data).

Or maybe...

=IF(COUNT(A1:A20)=COUNTIF(A1:A20,MAX(A1:A20)),"not enough numbers",
MAX(IF(A1:A20<MAX(A1:A20),A1:A20)))

Just in case there isn't a second unique number.

(It's still an array formula)

kwiklearner wrote:

I posted here yesterday when I needed to find the second maximum number
in a range =Large(). However, now I need to find the next unique
maximum number. Is there a way without having to write If statements?
My current approach is:
=IF(LARGE(D:D,2)=MAX,IF(LARGE(D:D,3)=MAX,LARGE(D:D ,4),LARGE(D:D,3)),LARGE(D:D,2))
This is just the beginning so I was wondering if there is a more
effecient way to return the second unique maximum?
Thanks in advance for your help.

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


--

Dave Peterson


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Next Unique Maximum


This is fantastic... it worked! Thank you so much!

Dave Peterson Wrote:
Adjust the range to match--but you can't use the whole column

(Ignore that portion about transposing your data.)

Dave Peterson wrote:

So you want to ignore all the values that are equal to the maximum?

=MAX(IF(A1:A20<MAX(A1:A20),A1:A20))

This is an array formula. Hit ctrl-shift-enter instead of enter. If

you do it
correctly, excel will wrap curly brackets {} around your formula.

(don't type
them yourself.)

Adjust the range to match--but you can't use the whole column (if you

ever
transpose your data).

Or maybe...

=IF(COUNT(A1:A20)=COUNTIF(A1:A20,MAX(A1:A20)),"not enough numbers",
MAX(IF(A1:A20<MAX(A1:A20),A1:A20)))

Just in case there isn't a second unique number.

(It's still an array formula)

kwiklearner wrote:

I posted here yesterday when I needed to find the second maximum

number
in a range =Large(). However, now I need to find the next unique
maximum number. Is there a way without having to write If

statements?
My current approach is:

=IF(LARGE(D:D,2)=MAX,IF(LARGE(D:D,3)=MAX,LARGE(D:D ,4),LARGE(D:D,3)),LARGE(D:D,2))
This is just the beginning so I was wondering if there is a more
effecient way to return the second unique maximum?
Thanks in advance for your help.

--
kwiklearner

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

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

http://www.excelforum.com/showthread...hreadid=520105

--

Dave Peterson


--

Dave Peterson



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

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
Filer for unique records and return all column data for unique rec bseeley Excel Discussion (Misc queries) 1 September 12th 09 12:17 AM
Return Maximum from Column directly above Maximum in Row Code Numpty Charts and Charting in Excel 2 November 19th 08 07:29 AM
How to pick out unique components in a list with unique and common iksuinje Excel Discussion (Misc queries) 2 August 20th 08 09:57 PM
Maximum Unique Records in Pivot Table Marston Excel Programming 1 August 13th 04 05:52 PM
Formulas for...1. Counting unique cells 2. Display unique contents J Excel Programming 0 April 23rd 04 09:20 PM


All times are GMT +1. The time now is 12:06 PM.

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

About Us

"It's about Microsoft Excel"