在EXCEL的B2列填写第一个公式
=IF(TRIM(A2)="","",IF(A2=0,"",IF(A2<0,"负",)&IF(INT(A2),TEXT(INT(ABS(A2)),"[dbnum2]")&"元",)&IF(INT(ABS(A2)*10)-INT(ABS(A2))*10,TEXT(INT(ABS(A2)*10)-INT(ABS(A2))*10,"[dbnum2]")&"角",IF(INT(ABS(A2))=ABS(A2),,IF(ABS(A2)<0.1,,"零")))&IF(ROUND(ABS(A2)*100-INT(ABS(A2)*10)*10,),TEXT(ROUND(ABS(A2)*100-INT(ABS(A2)*10)*10,),"[dbnum2]")&"分","整")))
在EXCEL的C2列填写第二个公式
=SUBSTITUTE(SUBSTITUTE(IF(ROUND(A2,2),TEXT(A2,";负")&TEXT(INT(ABS(A2)+0.5%),"[dbnum2]G/通用格式圆;;")&TEXT(RIGHT(TEXT(A2,".00"),2),"[dbnum2]0角0分;;整"),),"零角",IF(A2^2<1,,"零")),"零分","整")
阅读(1409) | 评论(0) | 转发(0) |