本帖最后由 tslx8129 于 2011-11-4 17:25 编辑
=INDEX(A2:A25,MID(INDEX(MID(TEXT(ROW(1:24),"00")&TEXT(MATCH(IF(IF(B2:B25=F2,G2,F2)&COUNTA(A2:A25)/2+1-C2:C25=H2&COUNTA(A2:A25)/2+1,"",IF(B2:B25=F2,G2,F2)&COUNTA(A2:A25)/2+1-C2:C25),B2:B25&C2:C25,),"00")&TEXT(ROW(1:24),"00"),1+2*(B2:B25=G2),4),SMALL(((ROW(1:24)<MATCH(MID(F2&G2&"",IF(B2:B25="",3,IF(B2:B25=F2,2,1)),1)&IF(C2:C25="","",COUNTA(A2:A25)/2+1-C2:C25),B2:B25&C2:C25,))*ROW(1:24)=0)*24+(ROW(1:24)<MATCH(MID(F2&G2&"",IF(B2:B25="",3,IF(B2:B25=F2,2,1)),1)&IF(C2:C25="","",COUNTA(A2:A25)/2+1-C2:C25),B2:B25&C2:C25,))*ROW(1:24),ROW(1:24))),{1,3},2))&"" |