在Excel中根据小写的金额自动生成大写金额.doc

上传人:PIYPING 文档编号:10784257 上传时间:2021-06-03 格式:DOC 页数:6 大小:42.01KB
返回 下载 相关 举报
在Excel中根据小写的金额自动生成大写金额.doc_第1页
第1页 / 共6页
在Excel中根据小写的金额自动生成大写金额.doc_第2页
第2页 / 共6页
在Excel中根据小写的金额自动生成大写金额.doc_第3页
第3页 / 共6页
在Excel中根据小写的金额自动生成大写金额.doc_第4页
第4页 / 共6页
在Excel中根据小写的金额自动生成大写金额.doc_第5页
第5页 / 共6页
点击查看更多>>
资源描述

《在Excel中根据小写的金额自动生成大写金额.doc》由会员分享,可在线阅读,更多相关《在Excel中根据小写的金额自动生成大写金额.doc(6页珍藏版)》请在三一文库上搜索。

1、在Excel中根据小写的金额自动生成大写金额2008年05月24日 星期六 10:44在Excel中,我想根据小写的金额自动生成大写金额例一:问:如附件所示,我希望根据已有的小写金额让Excel自动生成规范的大写金额。 谢谢! 附件:例表.人民币大小写之间的转换.xls答案一:=IF(ISNUMBER(A3),IF(INT(A3),TEXT(INT(A3),dbnum2)&元,)&IF(INT(A3*10)-INT(A3)*10,TEXT(INT(A3*10)-INT(A3)*10,dbnum2)&角,IF(INT(A3)=A3,IF(A30.1,零)&IF(ROUND(A3)*100-INT

2、(A3*10)*10,),TEXT(ROUND(A3*100-INT(A3*10)*10,),dbnum2)&分,整),) 附件:例表.人民币大小写之间的转换2.xls答案二:给你一个,放在工具里: Function convert_digital_chinese(ByVal Myinput) Dim Temp, TempA, MyinputA, MyinputB, MyinputC Dim Place As String Dim J As Integer Place = 分角元拾佰仟万拾佰仟亿拾佰仟万 shuzi1 = 壹贰叁肆伍陆柒捌玖 shuzi2 = 整零元零零零万零零零亿零零零万 q

3、ianzhui = If Myinput 999999999999999# Then mychange = 数字太大了吧? Exit Function End If If Myinput = 0 Then mychange = 零元零分 Exit Function End If MyinputA = Trim(Str(Myinput) shuzilong = Len(MyinputA) For J = 1 To shuzilong MyinputB = Mid(MyinputA, J, 1) & MyinputB Next For J = 1 To shuzilong Temp = Val(M

4、id(MyinputB, J, 1) If Temp = 0 Then MyinputC = Mid(shuzi2, J, 1) & MyinputC Else MyinputC = Mid(shuzi1, Temp, 1) & Mid(Place, J, 1) & MyinputC End If Next shuzilong = Len(MyinputC) For J = 1 To shuzilong - 1 If Mid(MyinputC, J, 1) = 零 Then Select Case Mid(MyinputC, J + 1, 1) Case 零, 元, 万, 亿, 整: Myin

5、putC = Left(MyinputC, J - 1) & Mid(MyinputC, J + 1, 30) J = J - 1 End Select End If Next shuzilong = Len(MyinputC) For J = 1 To shuzilong - 1 If Mid(MyinputC, J, 1) = 亿 And Mid(MyinputC, J + 1, 1) = 万 Then MyinputC = Left(MyinputC, J) & Mid(MyinputC, J + 2, 30) Exit For End If Next mychange = qianzhui & Trim(MyinputC) End Function来源:http:/ 167个字符 =SUBSTITUTE(SUBSTITUTE(IF(-RMB(A2),IF(A20,负)&TEXT(INT(ABS(A2)+0.5%),dbnum2G/通用格式元;)&TEXT(RIGHT(RMB(A2),2),dbnum20角0分;整),),零角,IF(A221,零),零分,整) 来源:http:/

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 科普知识


经营许可证编号:宁ICP备18001539号-1