先占位 答案已發 ^^
第一题:
=SUM(--(WEEKDAY(DATE(A4,B4,ROW(INDIRECT("1:"&DAY(DATE(A4,B4+1,))))),2)<6))
=COUNT(0/(WEEKDAY(A4&"-"&B4&"-"&ROW($1:$31),2)<6))
=COUNT(0/(MOD(A4&"-"&B4&"-"&ROW($1:$31),7)>1))
=COUNT(0/(MOD(A4&"-"&B4&"-"&ROW($1:31),7)>1))
第二题:
=INDEX($A$3:$A$7,ROW(A4)/4)
第三题:
=IF(A3="",C2,A3)
=LOOKUP(2,1/(A$3:A3<>""),A$3:A3)
第四题:
=TEXT(WEEKDAY(A3),"[=1]周末;[=7]周末;AAAA")
=TEXT(MOD(WEEKDAY(A3)-1,6)+1,"[=1]周末;AAAA")
=IF(WEEKDAY(A3,2)>5,"周末",TEXT(WEEKDAY(A3),"AAAA"))
=MID(TEXT(WEEKDAY(A3),"AAAA周末"),1+3*(WEEKDAY(A3,2)>5),3)
=IF(MOD(A3,7)<2,"周末",TEXT(WEEKDAY(A3),"AAAA"))
=TEXT(MOD(A3,7),"[<2]周末;AAAA")
第五题:
=IF(COUNTIF(A3,"*章"),SMALL(IF(ISNUMBER(FIND("章",A$3:A$25)),ROW($3:$25),26),COUNTIF(A$3:A3,"*章")+1)-ROW()-1,"")
=IF(COUNTIF(A3,"*章"),IF(ISNA(MATCH("*章",A4:A$26,)),25-ROW(),MATCH("*章",A4:A$26,)-1),"")
=IF(COUNTIF(A3,"*章"),IF(COUNTIF(A4:A$25,"*章"),MATCH("*章",A4:A$25,)-1,25-ROW()),"")
=IF(RIGHT(A3)="章",IF(COUNTIF(A4:A$25,"*章"),MATCH("*章",A4:A$25,)-1,25-ROW()),"")
第六题:
=INDEX(A$3:A$13,IFERROR(MATCH(ROW(A1),SUBTOTAL(9,OFFSET(B$2,,,ROW($1:$11)))+ROW($1:$11),),11))&""
=OFFSET(A$2,IFERROR(MATCH(ROW(A1),SUBTOTAL(9,OFFSET(B$2,,,ROW($1:$11)))+ROW($1:$11),),11),)&""
第七题:
=ABS(SMALL(IF(A3:A21<>A4:A22,ROW(3:21)),MATCH(LARGE(IFERROR((FREQUENCY(IF(A3:A21=A4:A22,ROW(3:21)),IF(A3:A21<>A4:A22,ROW(3:21)))+1)*100+ROW(1:19),0),1),IFERROR((FREQUENCY(IF(A3:A21=A4:A22,ROW(3:21)),IF(A3:A21<>A4:A22,ROW(3:21)))+1)*100+ROW(1:19),0),))-SMALL(IF(A3:A21<>A4:A22,ROW(3:21)),MATCH(LARGE(IFERROR((FREQUENCY(IF(A3:A21=A4:A22,ROW(3:21)),IF(A3:A21<>A4:A22,ROW(3:21)))+1)*100+ROW(1:19),0),2),IFERROR((FREQUENCY(IF(A3:A21=A4:A22,ROW(3:21)),IF(A3:A21<>A4:A22,ROW(3:21)))+1)*100+ROW(1:19),0),)))+1
<wangg913>
piny-2-解答.rar
(25.86 KB, 下载次数: 33)
第七题思路是看明白了,但是不限定版本,因此公式可以简化一下。
原思路是先求出最大的连续行,再求出第二大的连续行,然后相减
所以可以同时求出最大、二大,然后相减
下面公式中的 IFERROR 函数可以省略掉,因为 MATCH 函数仅仅查找同类型的数值,所以有没有错误时无所谓的
MATCH(LARGE(IFERROR((FREQUENCY(IF(A3:A21=A4:A22,ROW(3:21)),IF(A3:A21<>A4:A22,ROW(3:21)))+1)*100+ROW(1:19),0),1),IFERROR((FREQUENCY(IF(A3:A21=A4:A22,ROW(3:21)),IF(A3:A21<>A4:A22,ROW(3:21)))+1)*100+ROW(1:19),0),)
MATCH(LARGE(IFERROR((FREQUENCY(IF(A3:A21=A4:A22,ROW(3:21)),IF(A3:A21<>A4:A22,ROW(3:21)))+1)*100+ROW(1:19),0),1),(FREQUENCY(IF(A3:A21=A4:A22,ROW(3:21)),IF(A3:A21<>A4:A22,ROW(3:21)))+1)*100+ROW(1:19),)
既然没有版本限制,那么就无需考虑函数超过嵌套
因此,最大、二大同时求出然后相减就可以了
=ABS(SUM(RIGHT(SMALL(IF(A3:A21<>A4:A22,ROW(3:21)),MATCH(LARGE(IFERROR(FREQUENCY(IF(A3:A21=A4:A22,ROW(3:21)),IF(A3:A21<>A4:A22,ROW(3:21)))*100+ROW(1:19),), {1,2} ),FREQUENCY(IF(A3:A21=A4:A22,ROW(3:21)),IF(A3:A21<>A4:A22,ROW(3:21)))*100+ROW(1:19),)),2)*{1,-1}))+1
[ 本帖最后由 wangg913 于 2011-3-3 13:05 编辑 ] |