首页 数字转换为大写的函数

数字转换为大写的函数

举报
开通vip

数字转换为大写的函数function dx(q) dim cur as long,yuan as long dim jiao as integer,fen as integer dim cnyuan as string, cnjiao as string, cnfen as string if q = "" then dx = 0 exit function end if cur = round(q * 100) yuan = int(cur / 100) jiao = int(cur / 10) - yuan * 10 fen = ...

数字转换为大写的函数
function dx(q) dim cur as long,yuan as long dim jiao as integer,fen as integer dim cnyuan as string, cnjiao as string, cnfen as string if q = "" then dx = 0 exit function end if cur = round(q * 100) yuan = int(cur / 100) jiao = int(cur / 10) - yuan * 10 fen = cur - yuan * 100 - jiao * 10 cnyuan = application.worksheetfunction.text(yuan, "[dbnum2]") cnjiao = application.worksheetfunction.text(jiao, "[dbnum2]") cnfen = application.worksheetfunction.text(fen, "[dbnum2]") dx = cnyuan & "元" & "整" d1 = cnyuan & "元" if fen <> 0 and jiao <> 0 then dx = d1 & cnjiao & "角" & cnfen & "分" if yuan = 0 then dx = cnjiao & "角" & cnfen & "分" end if end if if fen = 0 and jiao <> 0 then dx = d1 & cnjiao & "角" & "整" if yuan = 0 then dx = cnjiao & "角" & "整" end if end if if fen <> 0 and jiao = 0 then dx = d1 & cnjiao & cnfen & "分" if yuan = 0 then dx = cnfen & "分" end if end if end function
本文档为【数字转换为大写的函数】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_977556
暂无简介~
格式:doc
大小:13KB
软件:Word
页数:0
分类:生活休闲
上传时间:2017-09-19
浏览量:29