若想實(shí)現(xiàn)數(shù)字轉(zhuǎn)為人民幣貨幣格式,效果如下: 0.22 貳角貳分| -0.12 負(fù)壹角貳分| -0.02 負(fù)貳分| -4123.12 負(fù)肆仟壹佰貳拾叁圓壹角貳分| 123.1 壹佰貳拾叁圓壹角整| 123 壹佰貳拾叁圓整 -123.3 負(fù)壹佰貳拾叁圓叁角整| 101.01 壹佰零壹圓零壹分| 120.01 壹佰貳拾圓零壹分| -123 負(fù)壹佰貳拾叁圓整| 123.55 壹佰貳拾叁圓伍角伍分| -123.65 負(fù)壹佰貳拾叁圓陸角伍分 方法1[203字符]: '=IF(E32<0,"負(fù)",)&SUBSTITUTE(SUBSTITUTE(TEXT(INT(ABS(E32)),"[dbnum2]")&"圓"&SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(TEXT(RIGHT(TEXT(E32,"0.00"),2),"[dbnum2]0角0分"),"零角零分","整"),"零分","整"),"零角","零"),"零圓零",""),"零圓","") 方法2[198字符]: '=SUBSTITUTE(SUBSTITUTE(IF(E32<0,"負(fù)",)&TEXT(INT(ABS(E32)),"[dbnum2]G/通用格式圓;;")&TEXT(RIGHT(ABS(E32)/1%,2),"[=0]整;[="&RIGHT(E32)*10&"]"&TEXT(RIGHT(E32),"[dbnum2]")&"角整;[dbnum2]0角0分"),"圓零角","圓零"),"零角",) 方法3[184字符]: '=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(IF(E41<0,"負(fù)",)&TEXT(INT(ABS(E41)),"[dbnum2]G/通用格式圓;;")&IF(INT(E41)=E41,"整",TEXT(RIGHT(TEXT(E41,".00"),2),"[dbnum2]0角0分")),"圓零角","圓零"),"零分","整"),"零角",) 方法4[172字符]: '=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(IF(B8<0,"負(fù)",)&TEXT(INT(ABS(B8)),"[dbnum2];; ")&TEXT(MOD(ABS(B8)*100,100),"[>9][dbnum2]圓0角0分;[=0]圓整;[dbnum2]圓零0分"),"零分","整")," 圓零",)," 圓",)
|
|