只能把答案算出来,不过公式太长了,两种方法都311个字符。唯一做到了一点,没用IF函数(Choose函数不知道算不算)
两个公式差不多:
=CHOOSE(1+MAX(NOT(ISERR(SEARCH(MID("鼠牛虎兔龍蛇馬羊猴雞狗豬鼠",SEARCH(A2:C2,"鼠牛虎兔龍蛇馬羊猴雞狗豬")+1,1),PHONETIC(A2:C2))))*{1,2,3}),"無相鄰",A2&”的下一個生肖是”&MID("鼠牛虎兔龍蛇馬羊猴雞狗豬鼠",SEARCH(A2,"鼠牛虎兔龍蛇馬羊猴雞狗豬")+1,1),B2&”的下一個生肖是”&MID("鼠牛虎兔龍蛇馬羊猴雞狗豬鼠",SEARCH(B2,"鼠牛虎兔龍蛇馬羊猴雞狗豬")+1,1),C2&”的下一個生肖是”&MID("鼠牛虎兔龍蛇馬羊猴雞狗豬鼠",SEARCH(C2,"鼠牛虎兔龍蛇馬羊猴雞狗豬")+1,1))
=SUBSTITUTE(CHOOSE(1+MAX(NOT(ISERR(SEARCH(MID("鼠牛虎兔龍蛇馬羊猴雞狗豬鼠",SEARCH(A2:C2,"鼠牛虎兔龍蛇馬羊猴雞狗豬")+1,1),PHONETIC(A2:C2))))*{1,2,3}),"無相鄰",A2&0&MID("鼠牛虎兔龍蛇馬羊猴雞狗豬鼠",SEARCH(A2,"鼠牛虎兔龍蛇馬羊猴雞狗豬")+1,1),B2&0&MID("鼠牛虎兔龍蛇馬羊猴雞狗豬鼠",SEARCH(B2,"鼠牛虎兔龍蛇馬羊猴雞狗豬")+1,1),C2&0&MID("鼠牛虎兔龍蛇馬羊猴雞狗豬鼠",SEARCH(C2,"鼠牛虎兔龍蛇馬羊猴雞狗豬")+1,1)),0,"的下一個生肖是")
开幝以后向高手学习。
PS:调试几次公式报错,原来是繁体字在做怪。下次希望楼主出贴的时候可以把繁体字给简化下。
终于可以了,190个字符,
=SUBSTITUTE(CHOOSE(MAX((MID("鼠牛虎兔龍蛇馬羊猴雞狗豬鼠",SEARCH(A2:C2,"鼠牛虎兔龍蛇馬羊猴雞狗豬")+1,1)=TRANSPOSE(A2:C2))*{1,2,3;4,5,6;7,8,9})+1,"無相鄰",,B2&0&A2,C2&0&A2,A2&0&B2,,C2&0&B2,A2&0&C2,B2&0&C2),"0","的下一個生肖是")
[ 本帖最后由 oyzhjr 于 2011-2-19 10:22 编辑 ] |