这个贴子开始我也想,这种老掉牙的贴子没什么好练习的。但事实证明,常翻来覆去的折腾旧贴还是有收获的,应该相信,老掉牙的的东西也会长出“老版主”这样的“新牙”来。17,18,19,23,27楼的公式,数字后面有“-”,“.”等也不出错,特别是17楼的公式很稳定,只要再考虑一下字符串不是数字开头的情况就很完美了,总之,大家都尽最大努力,表现出了超乎寻常的智慧,榨出了许许多多难以想象的精巧公式.
现贴出我不太通用的解法,供参考.
152
=IF(COUNT(-LEFT(A1,{1,2})),--LEFT(A1,MATCH(TRUE,MID(A1&"a0",COLUMN(1:1),1)>"9",)-1)*IF(MID(A1,MATCH(,0/ISERR(-MID(A1,COLUMN(1:1),2)),),1)="%",100,1),"")
147
=IF(COUNT(-LEFT(A1,{1,2})),--LEFT(A1,MATCH(,0/ISERR(-MID(A1,COLUMN(1:1),2)),))*IF(MID(A1,MATCH(,0/ISERR(-MID(A1,COLUMN(1:1),2)),),1)="%",100,1),"")
160
=IF(COUNT(-LEFT(A1,{1,2})),--LEFT(A1,MATCH(TRUE,ISERR(-(MID(A1&"a0",COLUMN(1:1),1)&0)),)-1)*IF(MID(A1,MATCH(,0/ISERR(-MID(A1,COLUMN(1:1),2)),),1)="%",100,1),"")
175
=IF(COUNT(-LEFT(A1,{1,2})),--LEFT(A1,MIN(--TEXT(ISERR(-(MID(A1,COLUMN(1:1),1)&0))*COLUMN(1:1),"0;;99"))-1)*IF(MID(A1,MATCH(,0/ISERR(-MID(A1,COLUMN(1:1),2)),),1)="%",100,1),"")
118
=IF(COUNT(-LEFT(A1,{1,2})),--LEFT(A1,MATCH(1,MMULT(-ISERR(FIND(MID(A1&"a0",ROW($1:66)+{0,1},1),0.5^19)),{1;-1}),)),"")
69
=LEFT(A1,MATCH(,0/ISERR(FIND(MID(A1&"A0",COLUMN(1:1),1),3^-4-2)),)-1)
96
=LEFT(A1,COUNT(-(LEFT(REPLACEB(A1,MIN(FIND({"/","e","年","%"},A1&"/e年%")),,"w"),COLUMN(1:1))&0)))
以下公式思路重复或相似或公式超长
122
=IF(COUNT(-LEFT(A1,{1,2})),LOOKUP(9E+307,--LEFT(REPLACEB(A1,MIN(FIND({"/","e","年","%"},A1&"/e年%")),,"w"),ROW($1:$15))),"")
138
=IF(COUNT(-LEFT(A1,{1,2})),--LEFT(A1,MATCH(TRUE,ISERR(-MID(REPLACEB(A1,MIN(FIND({"/","e","年","%"},A1&"/e年%")),,"w"),COLUMN(1:1),2)),)),"")
104
=LEFT(A1,MATCH(TRUE,MID(REPLACEB(A1,MIN(FIND({"/","e","年","%"},A1&"/e年%")),,"w"),COLUMN(1:1),1)>"9",)-1)
204
=IF(COUNT(-LEFT(A1,{1,2})),--LEFT(A1,MIN(IF(ISNUMBER(-(MID(A1,COLUMN(1:1),1)&0))*ISERR(-(MID(A1,COLUMN(1:1)+1,1)&0)),COLUMN(1:1),999)))*IF(MID(A1,MATCH(,0/ISERR(-MID(A1,COLUMN(1:1),2)),),1)="%",100,1),"")
212
=IF(COUNT(-LEFT(A1,{1,2})),--LEFT(A1,MIN(IF(ISERR(-(MID(A1,COLUMN(1:1),1)&0))*COLUMN(1:1),ISERR(-(MID(A1,COLUMN(1:1),1)&0))*COLUMN(1:1),99))-1)*IF(MID(A1,MATCH(,0/ISERR(-MID(A1,COLUMN(1:1),2)),),1)="%",100,1),"")
[ 本帖最后由 wshcw 于 2009-9-24 17:12 编辑 ] |