EXCEL表格,将小写金额数值转换为大写中文数字(美元),在转换的同时会四舍五入

2024-12-18 19:19:51
推荐回答(2个)
回答1:

刚刚回答了一样的问题,不会是同一个人吧。

如果只有两种货币。
=IF(A3="HKD",IF(ROUND(A1,2)<0,"金额为负无效",IF(ROUND(A1,2)=0,"零元",IF(ROUND(A1,2)<1,"",TEXT(INT(ROUND(A1,2)),"[dbnum2]")&"元")&IF(INT(ROUND(A1,2)*10)-INT(ROUND(A1,2))*10=0,IF(INT(ROUND(A1,2))*(INT(ROUND(A1,2)*100)-INT(ROUND(A1,2)*10)*10)=0,"","零"),TEXT(INT(ROUND(A1,2)*10)-INT(ROUND(A1,2))*10,"[dbnum2]")&"角")&IF((INT(ROUND(A1,2)*100)-INT(ROUND(A1,2)*10)*10)=0,"整",TEXT((INT(ROUND(A1,2)*100)-INT(ROUND(A1,2)*10)*10),"[dbnum2]")&"分"))),IF(A1<0,"金额为负无效",IF(OR(A1=0,A1=""),"零美元",IF(A1-TRUNC(A1)=0,NUMBERSTRING(TRUNC(ROUND(A1,1),0),2)&"美元整",NUMBERSTRING(TRUNC(A1,0),2)&"美元"&TEXT(INT(ROUND(A1,2)*100)-INT(ROUND(A1,2))*100,"[dbnum2]")&"美分"))))

如果只是以美分为单位:
=IF(A3="HKD",IF(ROUND(A1,2)<0,"金额为负无效",IF(ROUND(A1,2)=0,"零元",IF(ROUND(A1,2)<1,"",TEXT(INT(ROUND(A1,2)),"[dbnum2]")&"元")&IF(INT(ROUND(A1,2)*10)-INT(ROUND(A1,2))*10=0,IF(INT(ROUND(A1,2))*(INT(ROUND(A1,2)*100)-INT(ROUND(A1,2)*10)*10)=0,"","零"),TEXT(INT(ROUND(A1,2)*10)-INT(ROUND(A1,2))*10,"[dbnum2]")&"角")&IF((INT(ROUND(A1,2)*100)-INT(ROUND(A1,2)*10)*10)=0,"整",TEXT((INT(ROUND(A1,2)*100)-INT(ROUND(A1,2)*10)*10),"[dbnum2]")&"分"))),IF(A1<0,"金额为负无效",IF(OR(A1=0,A1=""),"零美元",NUMBERSTRING(ROUND(A1,2)*100,2)&"美分")))

回答2:

捌拾伍伍拾陆美分?