View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Domenic Domenic is offline
external usenet poster
 
Posts: 150
Default MATCH Multiple Criteria & Return Previous / Penultimate Match

In that case, try the following instead...

Array1:

=TRANSPOSE(ROW(INDIRECT("1:"&Sheet1!$AZ7)))

Array2:

=ISNUMBER(MATCH(IF(Data=TEXT(Sheet1!$AX7,0),ROW(Da ta)+Array1,""),IF(Data=
"",ROW(Data)),0))+0

Array3:

=MMULT(Array2,ROW(INDIRECT("1:"&Sheet1!$AZ7))^0)

Array4:

=ISNA(MATCH(IF(Data=TEXT(Sheet1!$AX7,0),ROW(Data)+ Sheet1!$AZ7+1,""),IF(Da
ta="",ROW(Data)),0))

BA7:

=INDEX(ID,LARGE(IF(Array3=$AZ7,IF(Array4,ROW(ID)-MIN(ROW(ID))+1)),2)+$AZ7
)

....confirmed with CONTROL+SHIFT+ENTER.

Hope this helps!

In article <7903cd033b3d1@uwe, "Sam via OfficeKB.com" <u4102@uwe
wrote:

Hi Domenic,

Thanks for further assistance.

Using your example below, my expected and required result would be ID 1307.
The number of EmptyText cell rows must be an explicit match. Thereby, a match,
if the number of EmptyText rows is an exact sequential match. If looking for
2 EmptyText cell rows then, there should be exactly 2 EmptyText rows below
the Text for it to be a match.

Cheers,
Sam