答案已发,请查收,期待gouweicao78版主187字符的公式 1,212字符(EXCEL2007 兼容模式下) =TEXT(MODE((B2=TEXT(QUARTILE(IF(A:A=A2,--SUBSTITUTE(SUBSTITUTE(B:B,"点",":"),"分",":")),{0,4}),"h点m分s"))*{1,2},1,2),"!"&A2&"[Dbnum1]第0次-"&SUBSTITUTE(LEFT(B2,FIND("分",B2)-1)&TEXT(RIGHTB(B2,2)/60,".00分!;!;"),0,"!0")) 2,187字符(EXCEL2007 兼容模式下) =LOOKUP("々",IF({0,1,1},IF(B2=TEXT(QUARTILE(IF(A:A=A2,--SUBSTITUTE(SUBSTITUTE(B:B,"点",":"),"分",":")),{0,4,0}),"h点m分s"),A2&{1,"第二次-","第一次-"}&LEFT(B2,FIND("分",B2)-1)&TEXT(RIGHTB(B2,2)/60,".00分")),"")) 由于在2007兼容模式下,数组公式可以引用整列如A:A作为参数,因此可以比2003下节省几个单元格引用的相关字符。这样做完全符合题目要求,不过我们在讨论这里的公式时还是以2003的为统一标准。 Lookup的做法曾经在我编题目的时候在脑子中一闪而过,感觉可以有不错的解法,但没有具体去实践。而xcd版主使用Lookup做出了很不错的解答。但也许是题目220个字符的最底线实在是比较宽松,因此xcd版主缺少进一步优化的动力。 第2个公式如果在2003版本下应该是207个字符: =LOOKUP("々",IF({0,1,1},IF(B2=TEXT(QUARTILE(IF(A$2:A$16=A2,--SUBSTITUTE(SUBSTITUTE(B$2:B$16,"点",":"),"分",":")),{0,4,0}),"h点m分s"),A2&{1,"第二次-","第一次-"}&LEFT(B2,FIND("分",B2)-1)&TEXT(RIGHTB(B2,2)/60,".00分")),"")) 如果依照此思路根据楼上的楼上所提到的基本考点稍微优化一下可缩短到184个字符: =LOOKUP("々",IF({0,1,1},IF(B2=TEXT(QUARTILE(IF(A$2:A$16=A2,--SUBSTITUTE(B$2:B$16&"秒","点","时")),{0,4,0}),"h点m分s"),A2&{1,"第二次-","第一次-"}&TEXT(SUBSTITUTE(B2&"秒","点","时")/60,"m点s.00分")),"")) 如果进一步优化,稍微改一下结构,可以缩短到180个字符: =LOOKUP("々",IF({0,1,1},IF(B2=TEXT(QUARTILE(IF(A$2:A$16=A2,--SUBSTITUTE(B$2:B$16&"秒","点","时")),{0,4,0}),"h点m分s"),A2&TEXT({0,3,2}+SUBSTITUTE(B2&"秒","点","时")/60,"第aaa次-m点s.00分")),"")) —— chrisfang
[此贴子已经被chrisfang于2008-7-22 17:48:54编辑过] |