2010EXCEL 数字小写转换大写财务圆角分格式
答案:5 悬赏:80 手机版
解决时间 2021-03-20 05:17
- 提问者网友:却不属于对方
- 2021-03-19 05:48
2010EXCEL 数字小写转换大写财务圆角分格式
最佳答案
- 五星知识达人网友:十年萤火照君眠
- 2021-03-19 05:56
我用的是人民币大写函数rmbdx()
Function rmbDX(M)
y = Int(Round(100 * Abs(M)) / 100)
j = Round(100 * Abs(M) + 0.00001) - y * 100
f = (j / 10 - Int(j / 10)) * 10
A = IIf(y < 1, "", "" & Application.Text(y, "[DBNum2]") & "元")
b = IIf(j > 9.5, Application.Text(Int(j / 10), "[DBNum2]") & "角", IIf(y < 1, "", IIf(f > 1, "零", "")))
c = IIf(f < 1, "整", Application.Text(Round(f, 0), "[DBNum2]") & "分")
rmbDX = IIf(Abs(M) < 0.005, "", IIf(M < 0, "负" & A & b & c, A & b & c))
End Function
追问
麻烦看看这是怎么回事呀
Function rmbDX(M)
y = Int(Round(100 * Abs(M)) / 100)
j = Round(100 * Abs(M) + 0.00001) - y * 100
f = (j / 10 - Int(j / 10)) * 10
A = IIf(y < 1, "", "" & Application.Text(y, "[DBNum2]") & "元")
b = IIf(j > 9.5, Application.Text(Int(j / 10), "[DBNum2]") & "角", IIf(y < 1, "", IIf(f > 1, "零", "")))
c = IIf(f < 1, "整", Application.Text(Round(f, 0), "[DBNum2]") & "分")
rmbDX = IIf(Abs(M) < 0.005, "", IIf(M < 0, "负" & A & b & c, A & b & c))
End Function
追问
麻烦看看这是怎么回事呀
全部回答
- 1楼网友:孤独入客枕
- 2021-03-19 09:18
如下图,在B2单元格中输入=TEXT(A1*10,"[dbnum2]0佰0拾0元0角")
- 2楼网友:你哪知我潦倒为你
- 2021-03-19 08:17
亲:如果以下答案能帮到你,请【采纳答案】,
如还有疑问,请【追问】,谢谢!
我这边有以前的领导帮我写的一个,我自己也还没搞懂,但确实非常好用,格式不用重新设置,=IF(ISNUMBER(D23),IF(ROUND(D23,2)<0,"无效数值",IF(ROUND(D23,2)=0,"零",IF(ROUND(D23,2)<1,"",TEXT(INT(ROUND(D23,2)),"[dbnum2]")&"元")&IF(INT(ROUND(D23,2)*10)-INT(ROUND(D23,2))*10=0,IF(INT(ROUND(D23,2))*(INT(ROUND(D23,2)*100)-INT(ROUND(D23,2)*10)*10)=0,"","零"),TEXT(INT(ROUND(D23,2)*10)-INT(ROUND(D23,2))*10,"[dbnum2]")&"角")&IF((INT(ROUND(D23,2)*100)-INT(ROUND(D23,2)*10)*10)=0,"整",TEXT((INT(ROUND(D23,2)*100)-INT(ROUND(D23,2)*10)*10),"[dbnum2]")&"分"))),"非数值!")
如还有疑问,请【追问】,谢谢!
我这边有以前的领导帮我写的一个,我自己也还没搞懂,但确实非常好用,格式不用重新设置,=IF(ISNUMBER(D23),IF(ROUND(D23,2)<0,"无效数值",IF(ROUND(D23,2)=0,"零",IF(ROUND(D23,2)<1,"",TEXT(INT(ROUND(D23,2)),"[dbnum2]")&"元")&IF(INT(ROUND(D23,2)*10)-INT(ROUND(D23,2))*10=0,IF(INT(ROUND(D23,2))*(INT(ROUND(D23,2)*100)-INT(ROUND(D23,2)*10)*10)=0,"","零"),TEXT(INT(ROUND(D23,2)*10)-INT(ROUND(D23,2))*10,"[dbnum2]")&"角")&IF((INT(ROUND(D23,2)*100)-INT(ROUND(D23,2)*10)*10)=0,"整",TEXT((INT(ROUND(D23,2)*100)-INT(ROUND(D23,2)*10)*10),"[dbnum2]")&"分"))),"非数值!")
- 3楼网友:鱼忧
- 2021-03-19 07:29
用公式:
=SUBSTITUTE(IF(-RMB(A1),IF(A1>0,,"负")&TEXT(INT(ABS(A1)+0.5%),"[dbnum2]G/通用格式元;;")&TEXT(RIGHt(RMB(A1,2),2),"[dbnum2]0角0分;;整"),),"零角",IF(A1^2<1,,"零"))
=SUBSTITUTE(IF(-RMB(A1),IF(A1>0,,"负")&TEXT(INT(ABS(A1)+0.5%),"[dbnum2]G/通用格式元;;")&TEXT(RIGHt(RMB(A1,2),2),"[dbnum2]0角0分;;整"),),"零角",IF(A1^2<1,,"零"))
- 4楼网友:白昼之月
- 2021-03-19 07:03
=SUBSTITUTE(SUBSTITUTE(IF(A2<0,"负","")&TEXT(TRUNC(ABS(ROUND(A2,2))),"[DBNum2]")&"元"&IF(ISERR(FIND(".",ROUND(A2,2))),"",TEXT(RIGHt(TRUNC(ROUND(A2,2)*10)),"[DBNum2]"))&IF(ISERR(FIND(".0",TEXT(A2,"0.00"))),"角","")&IF(LEFt(RIGHt(ROUND(A2,2),3))=".",TEXT(RIGHt(ROUND(A2,2)),"[DBNum2]")&"分",IF(ROUND(A2,2)=0,"","整")),"零元零",""),"零元","")
或
=SUBSTITUTE(SUBSTITUTE(IF(-RMB(A2),IF(A2>0,,"负")&TEXT(INT(ABS(A2)+0.5%),"[dbnum2]G/通用格式元;;")&TEXT(RIGHt(RMB(A2,2),2),"[dbnum2]0角0分;;整"),),"零角",IF(A2^2<1,,"零")),"零分","整")
或
=SUBSTITUTE(SUBSTITUTE(IF(-RMB(A2),IF(A2>0,,"负")&TEXT(INT(ABS(A2)+0.5%),"[dbnum2]G/通用格式元;;")&TEXT(RIGHt(RMB(A2,2),2),"[dbnum2]0角0分;;整"),),"零角",IF(A2^2<1,,"零")),"零分","整")
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯