1楼 的 公式,对于“玖佰零贰万零叁角贰分”“玖佰万元整”等似乎都无效
修改了一下,03版 普通公式, 不需要名称,也不需要Ctrl+Shift+Enter,到千亿级,就是比较长:
=IF(COUNT(FIND("亿",A2)),SUM(TEXT(FIND(MID(A2,FIND({"亿","拾","佰","仟"},A2&"整拾佰仟")-1,1),"拾佰仟整壹贰叁肆伍陆柒捌玖")-4,"0;!0")*10^{8,9,10,11}*(FIND({"亿","拾","佰","仟"},A2&"拾佰仟")<=FIND("亿",A2))))+IF(COUNT(FIND("万",A2)),SUM(TEXT(FIND(MID(A2,FIND({"万","拾","佰","仟"},A2&"整拾佰仟",IF(FIND("亿",A2&"亿")<LEN(A2),FIND("亿",A2),1))-1,1),"拾佰仟整壹贰叁肆伍陆柒捌玖")-4,"0;!0")*10^{4,5,6,7}*(FIND({"万","拾","佰","仟"},A2&"拾佰仟",IF(FIND("亿",A2&"亿")<LEN(A2),FIND("亿",A2),1))<=FIND("万",A2))))+SUM(TEXT(FIND(MID(MID(A2,MAX((FIND({"万","亿"},A2&{"万","亿"})<LEN(A2))*FIND({"万","亿"},A2&{"万","亿"}),1),99)&"分角元拾佰仟",FIND({"分","角","元","拾","佰","仟"},MID(A2,MAX((FIND({"万","亿"},A2&{"万","亿"})<LEN(A2))*FIND({"万","亿"},A2&{"万","亿"}),1),99)&"分角元拾佰仟")-1,1),"拾佰仟万亿元角分整壹贰叁肆伍陆柒捌玖")-9,"0;!0")*10^{-2,-1,0,1,2,3}) |