Excel 怎么将数字自转换成中文大写货币

2024-12-01 14:47:59
推荐回答(1个)
回答1:

假如数据在A1栏,在你需要的单元格输入:=IF(A1=INT(A1),NUMBERSTRING(INT(A1),2)&"元整",IF(A1*10=INT(A1*10),NUMBERSTRING(INT(A1),2)&"元"&NUMBERSTRING(INT(A1*10)-INT(A1)*10,2)&"角整",IF(ROUNDDOWN(A1*10-INT(A1)*10,0)=0,NUMBERSTRING(INT(A1),2)&"元零"&NUMBERSTRING(ROUND(A1*100-INT(A1*10)*10,0),2)&"分",NUMBERSTRING(INT(A1),2)&"元"&NUMBERSTRING(INT(A1*10)-INT(A1)*10,2)&"角"&NUMBERSTRING(ROUND(A1*100-INT(A1*10)*10,0),2)&"分")))
或输入:=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(TEXT(INT(A1),"[dbnum2];; ")&TEXT(MOD(A1*100,100),"[>9][dbnum2]元0角0分;[=0]元整;[dbnum2]元零0分"),"零分","整")," 元零",)," 元",)希望对你有帮助