假设数字在A1
在B1输入公式
=IF(OR(A1="",A1=0),"",TEXT(INT(A1),"[dbnum2]G/通用格式圆;负[dbnum2]G/通用格式圆;;")&TEXT(--RIGHT(INT(A1*10)),"[dbnum2]#角;;;")&TEXT(--RIGHT(INT(A1*100)),"[dbnum2]#分;;整;"))
或者
=SUBSTITUTE(IF(-RMB(A1),IF(A1>0,,"负")&TEXT(INT(ABS(A1)+0.5%),"[dbnum2]G/通用格式元;;")&TEXT(RIGHT(RMB(A1),2),"[>9][dbnum2]0角0分;"&IF(A1^2<1,,0)&"[>][dbnum2]0分;整"),),"零分","整")
就会在B1显示成:壹佰贰拾伍元贰角陆分
怎么A1中不输入文字时,B2不会显示0,让B2空白着
菜单栏,工具-选项-视图,取消“零值”的勾
EXCEL将数字转换成中文大写数字后如何显示角分元整:
用公式,假如A1是你的数据,在B1输入如下公式试试:
=TEXT(INT(A1),"[DBNum2]")&IF(ISERROR(FIND(".",A1)),"元整","元")&IF(ISERROR(FIND(".",A1)),"",IF(MID(A1,FIND(".",A1)+1,1)="0",IF(MID(A1,FIND(".",A1)+2,1)="","",TEXT(MID(A1,FIND(".",A1)+2,1),"[DBNum2]")&"分"),IF(MID(A1,FIND(".",A1)+2,1)="",TEXT(MID(A1,FIND(".",A1)+1,1),"[DBNum2]")&"角整",TEXT(MID(A1,FIND(".",A1)+1,1),"[DBNum2]")&"角"&TEXT(MID(A1,FIND(".",A1)+2,1),"[DBNum2]")&"分")))
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(NUMBERSTRING(INT(A1),2)&"圆"&TEXT(MOD(A1,1)*100,"[dbnum2]0角0分"),"零角零分","整"),"零角","零"),"零分","")
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(NUMBERSTRING(INT(A1),2)&"圆"&TEXT(MOD(A1,1)*100,"[dbnum2]0角0分"),"零角零分","整"),"零角","零"),"零分","整")
b2 =if(a1="","",a1)