Posted to microsoft.public.excel.worksheet.functions
|
|
Match Multiple Criteria and Return values positioned above the zero
The outstanding part is
somehow trying to list the returned values from earliest to most recent.
Somewhat unclear... Can you provide the expected result for the sample
data?
--
Domenic
Microsoft Excel MVP
www.xl-central.com
Your Quick Reference to Excel Solutions
In article <9f9c78ba85f1e@uwe, "Sam via OfficeKB.com" <u4102@uwe
wrote:
Hi Domenic,
Thank you very much for reply, and all your time and assistance.
Your solution does provide an answer in part. The outstanding part is
somehow trying to list the returned values from earliest to most recent. I'm
still trying to see if I can somehow list the returned values returned from
earliest to most recent.
Thank you for all your help.
If anything else comes to mind very much appreciated.
Cheers,
Sam
Domenic wrote:
Assumptions...
P19:V48 contains the data (referred to by the dynamic named range 'Data')
AA17 contains the criteria
Defined Names...
Insert Name Define
Name: Col
Refers to:
=INDEX(Data,0,ROWS(AA$19:AA19))
Click Add
Name: Array1
Refers to:
=OFFSET(Col,,,ROWS(Col)-$AA$17-2)
Click Add
Name: Array2
Refers to:
=N(OFFSET(Col,ROW(INDIRECT("1:"&ROWS(Col)-$AA$17-2))-1,0,1))
Click Add
Name: Array3
Refers to:
=N(OFFSET(Col,ROW(INDIRECT("1:"&ROWS(Col)-$AA$17-2))+TRANSPOSE(ROW(INDIRE
CT("1:"&$AA$17+2))-1),,1))
Click Add
Name: Array4
Refers to:
=MMULT(IF(Array20,IF(Array3=TRANSPOSE(MOD(ROW(IN DIRECT("1:"&$AA$17+2))-1
,$AA$17+1)),1,0),0),ROW(INDIRECT("1:"&$AA$17+2))^ 0)
Click Ok
Formulas...
AA19, copied down:
=SUMPRODUCT(--(Array4=$AA$17+2))
AB19, confirmed with CONTROL+SHIFT+ENTER, copied across and down:
=IF(COLUMNS($AB19:AB19)<=$AA19,INDEX(Array1,SMALL (IF(Array4=$AA$17+2,ROW(
Array1)-MIN(ROW(Array1))+1),COLUMNS($AB19:AB19))),"")
Hi All,
[quoted text clipped - 123 lines]
Thanks,
Sam
|