#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 168
Default 2nd & 3rd Max Date !

hello
i am using following formula for max date from my cash book, but how can i
get 2nd & 3rd max date ? my this formula is in sale list.

=IF($C5="","",SUMPRODUCT(MAX((CashBook!$L$11:$L$10 000=$C5)*(CashBook!$I$11:$I$10000))))

01/01/2009
02/01/2009
03/01/2009*
10/01/2009*
15/02/2009* <--- now getting with MAX
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default 2nd & 3rd Max Date !

Try this array formula** :

=IF($C5="","",LARGE(IF(CashBook!$L$11:$L$10000=$C5 ,CashBook!$I$11:$I$10000),n))

Where n = nth largest value you want. n = 1 is the equivalent of MAX. n = 2
for the 2nd largest, n = 3 for the 3rd largest, etc.

** 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.

--
Biff
Microsoft Excel MVP


"Tufail" wrote in message
...
hello
i am using following formula for max date from my cash book, but how can i
get 2nd & 3rd max date ? my this formula is in sale list.

=IF($C5="","",SUMPRODUCT(MAX((CashBook!$L$11:$L$10 000=$C5)*(CashBook!$I$11:$I$10000))))

01/01/2009
02/01/2009
03/01/2009*
10/01/2009*
15/02/2009* <--- now getting with MAX



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 168
Default 2nd & 3rd Max Date !

Thank you very much !


"T. Valko" wrote:

Try this array formula** :

=IF($C5="","",LARGE(IF(CashBook!$L$11:$L$10000=$C5 ,CashBook!$I$11:$I$10000),n))

Where n = nth largest value you want. n = 1 is the equivalent of MAX. n = 2
for the 2nd largest, n = 3 for the 3rd largest, etc.

** 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.

--
Biff
Microsoft Excel MVP


"Tufail" wrote in message
...
hello
i am using following formula for max date from my cash book, but how can i
get 2nd & 3rd max date ? my this formula is in sale list.

=IF($C5="","",SUMPRODUCT(MAX((CashBook!$L$11:$L$10 000=$C5)*(CashBook!$I$11:$I$10000))))

01/01/2009
02/01/2009
03/01/2009*
10/01/2009*
15/02/2009* <--- now getting with MAX




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 168
Default 2nd & 3rd Max Date !

dear biff,
error is coming out of $NUM! what should i do now ?
=IF($C5="","",LARGE(IF(CashBook!$L$11:$L$10000=$C5 ,CashBook!$I$11:$I$10000),N1))


"T. Valko" wrote:

Try this array formula** :

=IF($C5="","",LARGE(IF(CashBook!$L$11:$L$10000=$C5 ,CashBook!$I$11:$I$10000),n))

Where n = nth largest value you want. n = 1 is the equivalent of MAX. n = 2
for the 2nd largest, n = 3 for the 3rd largest, etc.

** 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.

--
Biff
Microsoft Excel MVP


"Tufail" wrote in message
...
hello
i am using following formula for max date from my cash book, but how can i
get 2nd & 3rd max date ? my this formula is in sale list.

=IF($C5="","",SUMPRODUCT(MAX((CashBook!$L$11:$L$10 000=$C5)*(CashBook!$I$11:$I$10000))))

01/01/2009
02/01/2009
03/01/2009*
10/01/2009*
15/02/2009* <--- now getting with MAX




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default 2nd & 3rd Max Date !

Is N1 a cell reference?

You'll get an error if there isn't a nth largest number. The nth argument
has to be a number that is not greater than the number of times
CashBook!$L$11:$L$10000=$C5.

Try this (array entered):

=IF($C5="","",IF(COUNTIF(CashBook!$L$11:$L$10000,$ C5)N1,"",LARGE(IF(CashBook!$L$11:$L$10000=$C5,Cas hBook!$I$11:$I$10000),N1)))

--
Biff
Microsoft Excel MVP


"Tufail" wrote in message
...
dear biff,
error is coming out of $NUM! what should i do now ?
=IF($C5="","",LARGE(IF(CashBook!$L$11:$L$10000=$C5 ,CashBook!$I$11:$I$10000),N1))


"T. Valko" wrote:

Try this array formula** :

=IF($C5="","",LARGE(IF(CashBook!$L$11:$L$10000=$C5 ,CashBook!$I$11:$I$10000),n))

Where n = nth largest value you want. n = 1 is the equivalent of MAX. n =
2
for the 2nd largest, n = 3 for the 3rd largest, etc.

** 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.

--
Biff
Microsoft Excel MVP


"Tufail" wrote in message
...
hello
i am using following formula for max date from my cash book, but how
can i
get 2nd & 3rd max date ? my this formula is in sale list.

=IF($C5="","",SUMPRODUCT(MAX((CashBook!$L$11:$L$10 000=$C5)*(CashBook!$I$11:$I$10000))))

01/01/2009
02/01/2009
03/01/2009*
10/01/2009*
15/02/2009* <--- now getting with MAX






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
date in Cell to change colors if the date is beyond today's date Pete Elbert Excel Discussion (Misc queries) 2 June 6th 09 06:31 AM
Given a date, how do I get the 1st date and the last date of theprevious month? Author[_2_] Excel Worksheet Functions 5 April 2nd 09 12:59 AM
Making a date go red, if date passes todays date. Jamie Excel Worksheet Functions 2 September 9th 08 02:14 PM
Report Date - Date Recv = Days Late, but how to rid completed date MS Questionnairess Excel Worksheet Functions 1 January 24th 07 11:05 PM
Date updates from worksheet to chart & changes date to a date series! Help!! Jayjg Charts and Charting in Excel 2 January 22nd 05 03:00 PM


All times are GMT +1. The time now is 05:20 PM.

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"