2010EXCEL 数字小写转换大写财务圆角分格式
比如数字是123.5我用的公式:=IF(ROUND(A2,2)=0,"",IF(A2<0,"负","")&IF(ABS(A2)>=1,TEXT(INT(ROUND(ABS...
比如数字是123.5
我用的公式:
=IF(ROUND(A2,2)=0,"",IF(A2<0," 负","")&IF(ABS(A2)>=1,TEXT(INT(ROUND(ABS(A2),2)),"[dbnum2]")&"元","")&IF(VALUE(MID(RIGHT(TEXT((ABS(A2)*100+100),"###"),2),1,1))=0,IF(VALUE(RIGHT(TEXT(ABS(A2)*100,"###"),1))=0," 整 ",IF(ABS(A2)>=1," 零","")&TEXT(VALUE(RIGHT(TEXT(ABS(A2)*100,"###"),1)),"[dbnum2]")&"分"),IF(VALUE(RIGHT(TEXT(ABS(A2)*100,"###"),1))=0,TEXT(VALUE(MID(RIGHT(TEXT((ABS(A2)*100+100),"###"),2),1,1)),"[dbnum2]")&" 角整",TEXT(VALUE(MID(RIGHT(TEXT((ABS(A2)*100+100),"###"),2),1,1)),"[dbnum2]")&"角 "&TEXT(VALUE(RIGHT(TEXT(ABS(A2)*100,"###"),1)),"[dbnum2]")&"分")))
并在format cell单元格式中special特殊中已选“中文大写数字”
但是结果显示还是123元5角整。
我希望的效果是 壹佰贰拾叁圆伍角整
请各位高手帮忙看看问题出在哪了? 展开
我用的公式:
=IF(ROUND(A2,2)=0,"",IF(A2<0," 负","")&IF(ABS(A2)>=1,TEXT(INT(ROUND(ABS(A2),2)),"[dbnum2]")&"元","")&IF(VALUE(MID(RIGHT(TEXT((ABS(A2)*100+100),"###"),2),1,1))=0,IF(VALUE(RIGHT(TEXT(ABS(A2)*100,"###"),1))=0," 整 ",IF(ABS(A2)>=1," 零","")&TEXT(VALUE(RIGHT(TEXT(ABS(A2)*100,"###"),1)),"[dbnum2]")&"分"),IF(VALUE(RIGHT(TEXT(ABS(A2)*100,"###"),1))=0,TEXT(VALUE(MID(RIGHT(TEXT((ABS(A2)*100+100),"###"),2),1,1)),"[dbnum2]")&" 角整",TEXT(VALUE(MID(RIGHT(TEXT((ABS(A2)*100+100),"###"),2),1,1)),"[dbnum2]")&"角 "&TEXT(VALUE(RIGHT(TEXT(ABS(A2)*100,"###"),1)),"[dbnum2]")&"分")))
并在format cell单元格式中special特殊中已选“中文大写数字”
但是结果显示还是123元5角整。
我希望的效果是 壹佰贰拾叁圆伍角整
请各位高手帮忙看看问题出在哪了? 展开
6个回答
展开全部
我用的是人民币大写函数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
展开全部
=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,,"零")),"零分","整")
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
用公式:
=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,,"零"))
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
不用如此复杂,可以用设置单元格式--》特殊---》人民币大写
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询