答案已发送,请评分。 ===================== 答题正确,过程复杂。 1、求出所有名字第一次出现的行号 =(MATCH(B2:B41,B2:B41,0)=A2:A41)*A2:A41 2、求出得到两种以上奖券的人第一次出现的行号 =(MATCH(B2:B41,B2:B41,0)<A2:A41)*(MATCH(B2:B41&C2:C41,B2:B41&C2:C41,0)=A2:A41)*MATCH(B2:B41,B2:B41,0) 3、根据前两步的结果,求出不重复的姓名所在行号: =SMALL(IF(ISNUMBER((MATCH((MATCH(B2:B41,B2:B41,0)=A2:A41)*A2:A41,(MATCH(B2:B41,B2:B41,0)<A2:A41)*(MATCH(B2:B41&C2:C41,B2:B41&C2:C41,0)=A2:A41)*MATCH(B2:B41,B2:B41,0),0)>0)*(MATCH(B2:B41,B2:B41,0)=A2:A41)*A2:A41),--TEXT((MATCH((MATCH(B2:B41,B2:B41,0)=A2:A41)*A2:A41,(MATCH(B2:B41,B2:B41,0)<A2:A41)*(MATCH(B2:B41&C2:C41,B2:B41&C2:C41,0)=A2:A41)*MATCH(B2:B41,B2:B41,0),0)>0)*(MATCH(B2:B41,B2:B41,0)=A2:A41)*A2:A41,"0;;41;"),41),ROW(1:41)) 这一步的处理复杂了。根据第2步的结果,可以这样生成结果: F26=IF(F25="","",INDEX(B:B,MIN(IF((MATCH(B$2:B$41,B$2:B$41,)<A$2:A$41)*(MATCH(B$2:B$41&C$2:C$41,B$2:B$41&C$2:C$41,0)=A$2:A$41)*MATCH(B$2:B$41,B:B,)>MATCH(F25,B:B,),(MATCH(B$2:B$41,B$2:B$41,)<A$2:A$41)*(MATCH(B$2:B$41&C$2:C$41,B$2:B$41&C$2:C$41,0)=A$2:A$41)*MATCH(B$2:B$41,B:B,),65536))))&"" 返回奖券内容的公式有新意,学习: G2=INDEX($C$2:$C$65536,SMALL((($B$2:$B$41<>F2)+(MATCH($B$2:$B$41&$C$2:$C$41,$B$2:$B$41&$C$2:$C$41,0)<>$A$2:$A$41))*100+$A$2:$A$41,COLUMN($A:$H)))&"" 在A列序号的基础上,姓名不等于F2的,加100(让其排在后面),如果奖券结果不是第一次出现的,也加上100。最后结果按从小到大排序,根据返回的行号,用INDEX()取交叉值就是所要的结果。
[此贴子已经被山菊花于2007-4-1 11:19:37编辑过] |