View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Array extended formula - sort

You could also try:

=IF(ROWS($1:1)<=COUNTIF(C$2:C$10,"0"),INDEX(A$2:A $10,SMALL(IF(E$2:E$10=LARGE(E$2:E$10,ROWS($1:1)),R OW(A$2:A$10)-MIN(ROW(A$2:A$10))+1),COUNTIF(E$2:E$10,"="&LARGE( E$2:E$10,ROWS($1:1)))-ROWS($1:1)+1)),"")


"yshridhar" wrote:

Hello everybody
The following is the debtors list
Invoice Debtor Amt Date Age
T001 DEF 140 11/09/2007 118
T002 BQE 0 25/12/2007 0
T003 ABC 100 25/12/2007 13
T004 ABC 0 02/05/2007 0
T005 ABC 20 11/09/2007 118
Age = amt0, today()-date

I want to list out the debtors list where amount 0, in descending order
on age. The array extended formula returned the following data.
Invoice Debtor Amt Date Age
T001 DEF 140 11/09/2007 118
T003 ABC 100 25/12/2007 13
T005 ABC 20 11/09/2007 118
The formula for invoice column is
=IF(ROWS($1:1)<=COUNTIF($C$2:$C$10,"0"),INDEX(A$2 :A$10,SMALL(IF($E$2:$E$10<0,ROW(A$2:A$10)-MIN(ROW(A$2:A$10))+1),ROWS($1:1))),"")
The other data are extracted using vlookup()
However i want the formula to list out the debtors list sorted on age. Any
suggestions.
Thank you all
with regards
Sreedhar