怎样在EXCEL中实现把输入的数字金额自动改成中文大写金额,包括"元尀角尀分".

2024-11-26 07:07:08
推荐回答(3个)
回答1:

假如你输的金额在A1单元格,那么在B1单元格输入;

=IF(ISNUMBER(A1)=FALSE,"输入非数字值",IF(A1>=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(ROUND(ABS(A1),2)<1,"","负"&TEXT(INT(ROUND(ABS(A1),2)),"[dbnum2]")&"元")&IF(INT(ROUND(ABS(A1),2)*10)-INT(ROUND(ABS(A1),2))*10=0,IF(INT(ROUND(ABS(A1),2))*(INT(ROUND(ABS(A1),2)*100)-INT(ROUND(ABS(A1),2)*10)*10)=0,"","零"),TEXT(INT(ROUND(ABS(A1),2)*10)-INT(ROUND(ABS(A1),2))*10,"[dbnum2]")&"角")&IF((INT(ROUND(ABS(A1),2)*100)-INT(ROUND(ABS(A1),2)*10)*10)=0,"整",TEXT((INT(ROUND(ABS(A1),2)*100)-INT(ROUND(ABS(A1),2)*10)*10),"[dbnum2]")&"分")))

回答2:

很遗憾这个不能做到,倒是能作代在金额前面加人民币符号或者美金符号

回答3:

=IF(A1<1,IF(A1<0.1,TEXT(INT(A1*100),"[DBNum2]G/通用格式")&"分",IF((INT(A1*100)-INT(A1*10)*10=0),TEXT(INT(A1*10),"[DBNum2]G/通用格式")&"角整",TEXT(INT(A1*10),"[DBNum2]G/通用格式")&"角"&TEXT(INT(A1*100)-INT(A1*10)*10,"[DBNum2]G/通用格式")&"分")),TEXT(INT(A1),"[DBNum2]G/通用格式"&"元")&IF((INT(A1*10)-INT(A1)*10)=0,IF((INT(A1*100)-INT(A1*10)*10)=0,"","零"),IF((INT(A1*0.1)-INT(A1)*0.1)=0,"零","")&TEXT(INT(A1*10)-INT(A1)*10,"[DBNum2]G/通用格式")&"角")&IF((INT(A1*100)-INT(A1*10)*10)=0,"整",TEXT(INT(A1*100)-INT(A1*10)*10,"[DBNum2]G/通用格式")&"分"))